fastly 8.10.0 → 10.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (378) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +51 -2
  3. data/Gemfile.lock +3 -3
  4. data/README.md +63 -45
  5. data/docs/AccessKey.md +12 -0
  6. data/docs/AccessKeyResponse.md +15 -0
  7. data/docs/AclsInComputeApi.md +4 -4
  8. data/docs/AiAcceleratorResponseBodyEnable.md +12 -0
  9. data/docs/AiAcceleratorResponseCustomer.md +10 -0
  10. data/docs/AiAcceleratorResponseCustomerCustomer.md +11 -0
  11. data/docs/AiAcceleratorResponseLinks.md +10 -0
  12. data/docs/AiAcceleratorResponseLinksLinks.md +10 -0
  13. data/docs/AiAcceleratorResponseProduct.md +10 -0
  14. data/docs/AiAcceleratorResponseProductProduct.md +11 -0
  15. data/docs/Backend.md +1 -1
  16. data/docs/BackendApi.md +4 -4
  17. data/docs/BackendResponse.md +1 -1
  18. data/docs/BillingUsageMetricsApi.md +17 -23
  19. data/docs/BotManagementResponseBodyEnable.md +12 -0
  20. data/docs/BotManagementResponseLinks.md +10 -0
  21. data/docs/BotManagementResponseLinksLinks.md +11 -0
  22. data/docs/BotManagementResponseProduct.md +10 -0
  23. data/docs/BotManagementResponseProductProduct.md +11 -0
  24. data/docs/BotManagementResponseService.md +10 -0
  25. data/docs/{EnabledProductResponseService.md → BotManagementResponseServiceService.md} +1 -1
  26. data/docs/BrotliCompressionResponseBodyEnable.md +12 -0
  27. data/docs/BrotliCompressionResponseLinks.md +10 -0
  28. data/docs/BrotliCompressionResponseLinksLinks.md +11 -0
  29. data/docs/BrotliCompressionResponseProduct.md +10 -0
  30. data/docs/BrotliCompressionResponseProductProduct.md +11 -0
  31. data/docs/BrotliCompressionResponseService.md +10 -0
  32. data/docs/ComputeAclList.md +11 -0
  33. data/docs/{LegacyWafTag.md → ComputeAclListMeta.md} +2 -2
  34. data/docs/ComputeAclLookup.md +1 -2
  35. data/docs/{InlineResponse2004Meta.md → ComputeAclUpdate.md} +2 -3
  36. data/docs/DdosProtectionRequestUpdateConfiguration.md +10 -0
  37. data/docs/DdosProtectionResponseConfiguration.md +10 -0
  38. data/docs/DdosProtectionResponseConfigurationConfiguration.md +10 -0
  39. data/docs/DdosProtectionResponseConfigure.md +13 -0
  40. data/docs/DdosProtectionResponseEnable.md +12 -0
  41. data/docs/DdosProtectionResponseLinks.md +10 -0
  42. data/docs/DdosProtectionResponseLinksLinks.md +11 -0
  43. data/docs/DdosProtectionResponseProduct.md +10 -0
  44. data/docs/DdosProtectionResponseProductProduct.md +11 -0
  45. data/docs/DdosProtectionResponseService.md +10 -0
  46. data/docs/DimensionAttributesCountryStats.md +12 -0
  47. data/docs/DimensionAttributesRate.md +10 -0
  48. data/docs/DimensionBrowser.md +10 -0
  49. data/docs/DimensionContentType.md +10 -0
  50. data/docs/DimensionCountry.md +10 -0
  51. data/docs/DimensionDevice.md +10 -0
  52. data/docs/DimensionOs.md +10 -0
  53. data/docs/DimensionResponse.md +10 -0
  54. data/docs/DimensionStatusCode.md +10 -0
  55. data/docs/DimensionUrl.md +10 -0
  56. data/docs/DomainInspectorMeasurements.md +2 -0
  57. data/docs/DomainInspectorResponseBodyEnable.md +12 -0
  58. data/docs/DomainInspectorResponseLinks.md +10 -0
  59. data/docs/DomainInspectorResponseLinksLinks.md +11 -0
  60. data/docs/DomainInspectorResponseProduct.md +10 -0
  61. data/docs/{InlineResponse2003Meta.md → DomainInspectorResponseProductProduct.md} +3 -3
  62. data/docs/DomainInspectorResponseService.md +10 -0
  63. data/docs/FanoutResponseBodyEnable.md +12 -0
  64. data/docs/FanoutResponseLinks.md +10 -0
  65. data/docs/{EnabledProductResponseLinks.md → FanoutResponseLinksLinks.md} +1 -1
  66. data/docs/FanoutResponseProduct.md +10 -0
  67. data/docs/{EnabledProductResponseProduct.md → FanoutResponseProductProduct.md} +1 -1
  68. data/docs/FanoutResponseService.md +10 -0
  69. data/docs/FilterFieldItem.md +12 -0
  70. data/docs/GetLogInsightsResponse.md +11 -0
  71. data/docs/GetLogRecordsResponse.md +11 -0
  72. data/docs/GetLogRecordsResponseMeta.md +10 -0
  73. data/docs/GetLogRecordsResponseMetaFilters.md +16 -0
  74. data/docs/ImageOptimizerResponseBodyEnable.md +12 -0
  75. data/docs/ImageOptimizerResponseLinks.md +10 -0
  76. data/docs/ImageOptimizerResponseLinksLinks.md +11 -0
  77. data/docs/ImageOptimizerResponseProduct.md +10 -0
  78. data/docs/ImageOptimizerResponseProductProduct.md +11 -0
  79. data/docs/ImageOptimizerResponseService.md +10 -0
  80. data/docs/InlineResponse2003.md +2 -2
  81. data/docs/InlineResponse2004.md +1 -1
  82. data/docs/InsightsApi.md +69 -0
  83. data/docs/KvStoreApi.md +30 -30
  84. data/docs/{Batch.md → KvStoreBatchResponse.md} +2 -2
  85. data/docs/{BatchErrors.md → KvStoreBatchResponseErrors.md} +4 -4
  86. data/docs/{StoreResponse.md → KvStoreDetails.md} +2 -2
  87. data/docs/KvStoreItemApi.md +55 -50
  88. data/docs/KvStoreRequestCreate.md +10 -0
  89. data/docs/KvStoreUpsertBatch.md +14 -0
  90. data/docs/LogExplorerApi.md +65 -0
  91. data/docs/LogExplorerInsightsResponseBodyEnable.md +12 -0
  92. data/docs/LogExplorerInsightsResponseLinks.md +10 -0
  93. data/docs/LogExplorerInsightsResponseLinksLinks.md +11 -0
  94. data/docs/LogExplorerInsightsResponseProduct.md +10 -0
  95. data/docs/LogExplorerInsightsResponseProductProduct.md +11 -0
  96. data/docs/LogExplorerInsightsResponseService.md +10 -0
  97. data/docs/LogInsights.md +12 -0
  98. data/docs/LogInsightsDimensionAttributes.md +49 -0
  99. data/docs/LogInsightsDimensions.md +61 -0
  100. data/docs/LogInsightsMeta.md +10 -0
  101. data/docs/LogInsightsMetaFilter.md +14 -0
  102. data/docs/LogInsightsValues.md +65 -0
  103. data/docs/{ReadOnlyServiceId.md → LogPropertyServiceId.md} +1 -1
  104. data/docs/LogRecord.md +37 -0
  105. data/docs/LoggingGrafanacloudlogsAdditional.md +14 -0
  106. data/docs/LoggingGrafanacloudlogsApi.md +259 -0
  107. data/docs/LoggingGrafanacloudlogsResponse.md +23 -0
  108. data/docs/{ReadOnlyVersion.md → NgwafRequestEnable.md} +2 -1
  109. data/docs/NgwafRequestUpdateConfiguration.md +11 -0
  110. data/docs/NgwafResponseConfiguration.md +10 -0
  111. data/docs/{ConfiguredProductResponseConfiguration.md → NgwafResponseConfigurationConfiguration.md} +2 -2
  112. data/docs/NgwafResponseConfigure.md +13 -0
  113. data/docs/NgwafResponseEnable.md +12 -0
  114. data/docs/NgwafResponseLinks.md +10 -0
  115. data/docs/{ConfiguredProductResponseLinks.md → NgwafResponseLinksLinks.md} +1 -1
  116. data/docs/NgwafResponseProduct.md +10 -0
  117. data/docs/{ConfiguredProductResponseProduct.md → NgwafResponseProductProduct.md} +1 -1
  118. data/docs/NgwafResponseService.md +10 -0
  119. data/docs/ObjectStorageAccessKeysApi.md +163 -0
  120. data/docs/ObjectStorageResponseBodyEnable.md +12 -0
  121. data/docs/ObjectStorageResponseCustomer.md +10 -0
  122. data/docs/ObjectStorageResponseLinks.md +10 -0
  123. data/docs/ObjectStorageResponseLinksLinks.md +10 -0
  124. data/docs/ObjectStorageResponseProduct.md +10 -0
  125. data/docs/ObjectStorageResponseProductProduct.md +11 -0
  126. data/docs/OriginInspectorMeasurements.md +4 -0
  127. data/docs/OriginInspectorResponseBodyEnable.md +12 -0
  128. data/docs/OriginInspectorResponseLinks.md +10 -0
  129. data/docs/OriginInspectorResponseLinksLinks.md +11 -0
  130. data/docs/OriginInspectorResponseProduct.md +10 -0
  131. data/docs/OriginInspectorResponseProductProduct.md +11 -0
  132. data/docs/OriginInspectorResponseService.md +10 -0
  133. data/docs/OriginInspectorValues.md +4 -0
  134. data/docs/ProductAiAcceleratorApi.md +115 -0
  135. data/docs/ProductBotManagementApi.md +130 -0
  136. data/docs/ProductBrotliCompressionApi.md +130 -0
  137. data/docs/ProductDdosProtectionApi.md +208 -0
  138. data/docs/ProductDomainInspectorApi.md +130 -0
  139. data/docs/ProductFanoutApi.md +130 -0
  140. data/docs/ProductImageOptimizerApi.md +130 -0
  141. data/docs/ProductLogExplorerInsightsApi.md +130 -0
  142. data/docs/ProductNgwafApi.md +210 -0
  143. data/docs/ProductObjectStorageApi.md +115 -0
  144. data/docs/ProductOriginInspectorApi.md +130 -0
  145. data/docs/ProductWebsocketsApi.md +130 -0
  146. data/docs/RealtimeEntryAggregated.md +18 -7
  147. data/docs/RealtimeMeasurements.md +18 -7
  148. data/docs/Results.md +18 -7
  149. data/docs/SnippetApi.md +15 -15
  150. data/docs/Usagemetric.md +18 -0
  151. data/docs/{Store.md → Usagemetrics.md} +2 -2
  152. data/docs/ValueField.md +59 -0
  153. data/docs/Values.md +2 -0
  154. data/docs/Values503Responses.md +12 -0
  155. data/docs/ValuesBandwidth.md +11 -0
  156. data/docs/ValuesBrowser.md +11 -0
  157. data/docs/ValuesCacheHitRatio.md +10 -0
  158. data/docs/ValuesCountryStats.md +12 -0
  159. data/docs/ValuesDuration.md +12 -0
  160. data/docs/ValuesMisses.md +10 -0
  161. data/docs/ValuesRate.md +10 -0
  162. data/docs/ValuesRequests.md +10 -0
  163. data/docs/ValuesStatusCodes.md +12 -0
  164. data/docs/WebsocketsResponseBodyEnable.md +12 -0
  165. data/docs/WebsocketsResponseLinks.md +10 -0
  166. data/docs/WebsocketsResponseLinksLinks.md +11 -0
  167. data/docs/WebsocketsResponseProduct.md +10 -0
  168. data/docs/WebsocketsResponseProductProduct.md +11 -0
  169. data/docs/WebsocketsResponseService.md +10 -0
  170. data/lib/fastly/api/acls_in_compute_api.rb +6 -6
  171. data/lib/fastly/api/backend_api.rb +4 -4
  172. data/lib/fastly/api/billing_usage_metrics_api.rb +46 -73
  173. data/lib/fastly/api/insights_api.rb +125 -0
  174. data/lib/fastly/api/kv_store_api.rb +53 -45
  175. data/lib/fastly/api/kv_store_item_api.rb +114 -99
  176. data/lib/fastly/api/log_explorer_api.rb +109 -0
  177. data/lib/fastly/api/logging_grafanacloudlogs_api.rb +471 -0
  178. data/lib/fastly/api/object_storage_access_keys_api.rb +263 -0
  179. data/lib/fastly/api/product_ai_accelerator_api.rb +186 -0
  180. data/lib/fastly/api/product_bot_management_api.rb +207 -0
  181. data/lib/fastly/api/product_brotli_compression_api.rb +207 -0
  182. data/lib/fastly/api/product_ddos_protection_api.rb +340 -0
  183. data/lib/fastly/api/product_domain_inspector_api.rb +207 -0
  184. data/lib/fastly/api/product_fanout_api.rb +207 -0
  185. data/lib/fastly/api/product_image_optimizer_api.rb +207 -0
  186. data/lib/fastly/api/product_log_explorer_insights_api.rb +207 -0
  187. data/lib/fastly/api/product_ngwaf_api.rb +347 -0
  188. data/lib/fastly/api/product_object_storage_api.rb +186 -0
  189. data/lib/fastly/api/product_origin_inspector_api.rb +207 -0
  190. data/lib/fastly/api/product_websockets_api.rb +207 -0
  191. data/lib/fastly/api/snippet_api.rb +35 -35
  192. data/lib/fastly/configuration.rb +308 -200
  193. data/lib/fastly/models/access_key.rb +248 -0
  194. data/lib/fastly/models/{legacy_waf_update_status.rb → access_key_response.rb} +48 -46
  195. data/lib/fastly/models/ai_accelerator_response_body_enable.rb +243 -0
  196. data/lib/fastly/models/ai_accelerator_response_customer.rb +216 -0
  197. data/lib/fastly/models/ai_accelerator_response_customer_customer.rb +227 -0
  198. data/lib/fastly/models/ai_accelerator_response_links.rb +216 -0
  199. data/lib/fastly/models/ai_accelerator_response_links_links.rb +217 -0
  200. data/lib/fastly/models/ai_accelerator_response_product.rb +216 -0
  201. data/lib/fastly/models/ai_accelerator_response_product_product.rb +227 -0
  202. data/lib/fastly/models/backend.rb +1 -1
  203. data/lib/fastly/models/backend_response.rb +1 -1
  204. data/lib/fastly/models/bot_management_response_body_enable.rb +243 -0
  205. data/lib/fastly/models/bot_management_response_links.rb +216 -0
  206. data/lib/fastly/models/bot_management_response_links_links.rb +227 -0
  207. data/lib/fastly/models/bot_management_response_product.rb +216 -0
  208. data/lib/fastly/models/bot_management_response_product_product.rb +227 -0
  209. data/lib/fastly/models/bot_management_response_service.rb +216 -0
  210. data/lib/fastly/models/{enabled_product_response_service.rb → bot_management_response_service_service.rb} +3 -3
  211. data/lib/fastly/models/brotli_compression_response_body_enable.rb +243 -0
  212. data/lib/fastly/models/brotli_compression_response_links.rb +216 -0
  213. data/lib/fastly/models/brotli_compression_response_links_links.rb +227 -0
  214. data/lib/fastly/models/brotli_compression_response_product.rb +216 -0
  215. data/lib/fastly/models/brotli_compression_response_product_product.rb +227 -0
  216. data/lib/fastly/models/brotli_compression_response_service.rb +216 -0
  217. data/lib/fastly/models/compute_acl_list.rb +228 -0
  218. data/lib/fastly/models/compute_acl_list_entries.rb +1 -1
  219. data/lib/fastly/models/compute_acl_list_meta.rb +218 -0
  220. data/lib/fastly/models/compute_acl_lookup.rb +3 -13
  221. data/lib/fastly/models/compute_acl_update.rb +219 -0
  222. data/lib/fastly/models/compute_acl_update_entry.rb +1 -1
  223. data/lib/fastly/models/ddos_protection_request_update_configuration.rb +256 -0
  224. data/lib/fastly/models/ddos_protection_response_configuration.rb +216 -0
  225. data/lib/fastly/models/ddos_protection_response_configuration_configuration.rb +217 -0
  226. data/lib/fastly/models/ddos_protection_response_configure.rb +253 -0
  227. data/lib/fastly/models/ddos_protection_response_enable.rb +243 -0
  228. data/lib/fastly/models/ddos_protection_response_links.rb +216 -0
  229. data/lib/fastly/models/ddos_protection_response_links_links.rb +227 -0
  230. data/lib/fastly/models/ddos_protection_response_product.rb +216 -0
  231. data/lib/fastly/models/ddos_protection_response_product_product.rb +227 -0
  232. data/lib/fastly/models/ddos_protection_response_service.rb +216 -0
  233. data/lib/fastly/models/dimension_attributes_country_stats.rb +237 -0
  234. data/lib/fastly/models/dimension_attributes_rate.rb +217 -0
  235. data/lib/fastly/models/dimension_browser.rb +217 -0
  236. data/lib/fastly/models/dimension_content_type.rb +217 -0
  237. data/lib/fastly/models/dimension_country.rb +217 -0
  238. data/lib/fastly/models/dimension_device.rb +217 -0
  239. data/lib/fastly/models/{store.rb → dimension_os.rb} +11 -11
  240. data/lib/fastly/models/{read_only_service_id.rb → dimension_response.rb} +15 -5
  241. data/lib/fastly/models/dimension_status_code.rb +217 -0
  242. data/lib/fastly/models/{legacy_waf_tag.rb → dimension_url.rb} +11 -11
  243. data/lib/fastly/models/domain_inspector_measurements.rb +21 -1
  244. data/lib/fastly/models/domain_inspector_response_body_enable.rb +243 -0
  245. data/lib/fastly/models/domain_inspector_response_links.rb +216 -0
  246. data/lib/fastly/models/domain_inspector_response_links_links.rb +227 -0
  247. data/lib/fastly/models/domain_inspector_response_product.rb +216 -0
  248. data/lib/fastly/models/domain_inspector_response_product_product.rb +227 -0
  249. data/lib/fastly/models/domain_inspector_response_service.rb +216 -0
  250. data/lib/fastly/models/fanout_response_body_enable.rb +243 -0
  251. data/lib/fastly/models/fanout_response_links.rb +216 -0
  252. data/lib/fastly/models/{enabled_product_response_links.rb → fanout_response_links_links.rb} +3 -3
  253. data/lib/fastly/models/fanout_response_product.rb +216 -0
  254. data/lib/fastly/models/{enabled_product_response_product.rb → fanout_response_product_product.rb} +3 -3
  255. data/lib/fastly/models/fanout_response_service.rb +216 -0
  256. data/lib/fastly/models/filter_field_item.rb +271 -0
  257. data/lib/fastly/models/{inline_response2004_meta.rb → get_log_insights_response.rb} +18 -16
  258. data/lib/fastly/models/get_log_records_response.rb +227 -0
  259. data/lib/fastly/models/get_log_records_response_meta.rb +216 -0
  260. data/lib/fastly/models/{legacy_waf_firewall.rb → get_log_records_response_meta_filters.rb} +80 -70
  261. data/lib/fastly/models/image_optimizer_response_body_enable.rb +243 -0
  262. data/lib/fastly/models/image_optimizer_response_links.rb +216 -0
  263. data/lib/fastly/models/image_optimizer_response_links_links.rb +227 -0
  264. data/lib/fastly/models/image_optimizer_response_product.rb +216 -0
  265. data/lib/fastly/models/image_optimizer_response_product_product.rb +227 -0
  266. data/lib/fastly/models/image_optimizer_response_service.rb +216 -0
  267. data/lib/fastly/models/inline_response2003.rb +2 -2
  268. data/lib/fastly/models/inline_response2004.rb +1 -1
  269. data/lib/fastly/models/{batch.rb → kv_store_batch_response.rb} +5 -5
  270. data/lib/fastly/models/{batch_errors.rb → kv_store_batch_response_errors.rb} +6 -6
  271. data/lib/fastly/models/{store_response.rb → kv_store_details.rb} +4 -4
  272. data/lib/fastly/models/{legacy_waf_configuration_set.rb → kv_store_request_create.rb} +10 -15
  273. data/lib/fastly/models/kv_store_upsert_batch.rb +269 -0
  274. data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +243 -0
  275. data/lib/fastly/models/log_explorer_insights_response_links.rb +216 -0
  276. data/lib/fastly/models/log_explorer_insights_response_links_links.rb +227 -0
  277. data/lib/fastly/models/log_explorer_insights_response_product.rb +216 -0
  278. data/lib/fastly/models/log_explorer_insights_response_product_product.rb +227 -0
  279. data/lib/fastly/models/log_explorer_insights_response_service.rb +216 -0
  280. data/lib/fastly/models/log_insights.rb +234 -0
  281. data/lib/fastly/models/log_insights_dimension_attributes.rb +103 -0
  282. data/lib/fastly/models/log_insights_dimensions.rb +109 -0
  283. data/lib/fastly/models/log_insights_meta.rb +217 -0
  284. data/lib/fastly/models/{inline_response2003_meta.rb → log_insights_meta_filter.rb} +69 -13
  285. data/lib/fastly/models/log_insights_values.rb +111 -0
  286. data/lib/fastly/models/{read_only_version.rb → log_property_service_id.rb} +4 -3
  287. data/lib/fastly/models/log_record.rb +486 -0
  288. data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +257 -0
  289. data/lib/fastly/models/logging_grafanacloudlogs_response.rb +408 -0
  290. data/lib/fastly/models/{set_workspace_id.rb → ngwaf_request_enable.rb} +9 -4
  291. data/lib/fastly/models/{set_configuration.rb → ngwaf_request_update_configuration.rb} +5 -5
  292. data/lib/fastly/models/ngwaf_response_configuration.rb +216 -0
  293. data/lib/fastly/models/{configured_product_response_configuration.rb → ngwaf_response_configuration_configuration.rb} +4 -4
  294. data/lib/fastly/models/{configured_product_response.rb → ngwaf_response_configure.rb} +17 -7
  295. data/lib/fastly/models/{enabled_product_response.rb → ngwaf_response_enable.rb} +15 -6
  296. data/lib/fastly/models/ngwaf_response_links.rb +216 -0
  297. data/lib/fastly/models/{configured_product_response_links.rb → ngwaf_response_links_links.rb} +3 -3
  298. data/lib/fastly/models/ngwaf_response_product.rb +216 -0
  299. data/lib/fastly/models/ngwaf_response_product_product.rb +227 -0
  300. data/lib/fastly/models/ngwaf_response_service.rb +216 -0
  301. data/lib/fastly/models/object_storage_response_body_enable.rb +243 -0
  302. data/lib/fastly/models/object_storage_response_customer.rb +216 -0
  303. data/lib/fastly/models/object_storage_response_links.rb +216 -0
  304. data/lib/fastly/models/object_storage_response_links_links.rb +217 -0
  305. data/lib/fastly/models/object_storage_response_product.rb +216 -0
  306. data/lib/fastly/models/object_storage_response_product_product.rb +227 -0
  307. data/lib/fastly/models/origin_inspector_measurements.rb +41 -1
  308. data/lib/fastly/models/origin_inspector_response_body_enable.rb +243 -0
  309. data/lib/fastly/models/origin_inspector_response_links.rb +216 -0
  310. data/lib/fastly/models/origin_inspector_response_links_links.rb +227 -0
  311. data/lib/fastly/models/origin_inspector_response_product.rb +216 -0
  312. data/lib/fastly/models/origin_inspector_response_product_product.rb +227 -0
  313. data/lib/fastly/models/origin_inspector_response_service.rb +216 -0
  314. data/lib/fastly/models/origin_inspector_values.rb +41 -1
  315. data/lib/fastly/models/realtime_entry_aggregated.rb +184 -74
  316. data/lib/fastly/models/realtime_measurements.rb +184 -74
  317. data/lib/fastly/models/results.rb +181 -71
  318. data/lib/fastly/models/schemas_snippet_response.rb +1 -0
  319. data/lib/fastly/models/snippet.rb +1 -0
  320. data/lib/fastly/models/snippet_common.rb +1 -0
  321. data/lib/fastly/models/snippet_response.rb +1 -0
  322. data/lib/fastly/models/snippet_response_post.rb +1 -0
  323. data/lib/fastly/models/snippet_with_dynamic_number.rb +1 -0
  324. data/lib/fastly/models/usagemetric.rb +297 -0
  325. data/lib/fastly/models/usagemetrics.rb +218 -0
  326. data/lib/fastly/models/value_field.rb +108 -0
  327. data/lib/fastly/models/values.rb +21 -1
  328. data/lib/fastly/models/{legacy_waf_rule_status.rb → values503_responses.rb} +25 -25
  329. data/lib/fastly/models/values_bandwidth.rb +227 -0
  330. data/lib/fastly/models/values_browser.rb +227 -0
  331. data/lib/fastly/models/values_cache_hit_ratio.rb +217 -0
  332. data/lib/fastly/models/values_country_stats.rb +237 -0
  333. data/lib/fastly/models/{legacy_waf_rule.rb → values_duration.rb} +25 -45
  334. data/lib/fastly/models/values_misses.rb +217 -0
  335. data/lib/fastly/models/values_rate.rb +217 -0
  336. data/lib/fastly/models/values_requests.rb +217 -0
  337. data/lib/fastly/models/values_status_codes.rb +237 -0
  338. data/lib/fastly/models/websockets_response_body_enable.rb +243 -0
  339. data/lib/fastly/models/websockets_response_links.rb +216 -0
  340. data/lib/fastly/models/websockets_response_links_links.rb +227 -0
  341. data/lib/fastly/models/websockets_response_product.rb +216 -0
  342. data/lib/fastly/models/{configured_product_response_product.rb → websockets_response_product_product.rb} +3 -3
  343. data/lib/fastly/models/websockets_response_service.rb +216 -0
  344. data/lib/fastly/version.rb +1 -1
  345. data/lib/fastly.rb +147 -35
  346. data/sig.json +1 -1
  347. metadata +299 -75
  348. data/docs/ConfiguredProductResponse.md +0 -13
  349. data/docs/EnabledProductResponse.md +0 -12
  350. data/docs/EnabledProductsApi.md +0 -220
  351. data/docs/LegacyWafConfigurationSet.md +0 -11
  352. data/docs/LegacyWafConfigurationSetsApi.md +0 -128
  353. data/docs/LegacyWafFirewall.md +0 -18
  354. data/docs/LegacyWafFirewallApi.md +0 -355
  355. data/docs/LegacyWafOwasp.md +0 -38
  356. data/docs/LegacyWafOwaspApi.md +0 -141
  357. data/docs/LegacyWafRule.md +0 -14
  358. data/docs/LegacyWafRuleApi.md +0 -187
  359. data/docs/LegacyWafRuleStatus.md +0 -12
  360. data/docs/LegacyWafRuleStatusApi.md +0 -205
  361. data/docs/LegacyWafRuleset.md +0 -11
  362. data/docs/LegacyWafRulesetApi.md +0 -139
  363. data/docs/LegacyWafTagApi.md +0 -61
  364. data/docs/LegacyWafUpdateStatus.md +0 -15
  365. data/docs/LegacyWafUpdateStatusApi.md +0 -105
  366. data/docs/SetConfiguration.md +0 -11
  367. data/docs/SetWorkspaceId.md +0 -10
  368. data/lib/fastly/api/enabled_products_api.rb +0 -382
  369. data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +0 -209
  370. data/lib/fastly/api/legacy_waf_firewall_api.rb +0 -627
  371. data/lib/fastly/api/legacy_waf_owasp_api.rb +0 -244
  372. data/lib/fastly/api/legacy_waf_rule_api.rb +0 -307
  373. data/lib/fastly/api/legacy_waf_rule_status_api.rb +0 -366
  374. data/lib/fastly/api/legacy_waf_ruleset_api.rb +0 -237
  375. data/lib/fastly/api/legacy_waf_tag_api.rb +0 -96
  376. data/lib/fastly/api/legacy_waf_update_status_api.rb +0 -184
  377. data/lib/fastly/models/legacy_waf_owasp.rb +0 -527
  378. data/lib/fastly/models/legacy_waf_ruleset.rb +0 -227
@@ -18,25 +18,29 @@ module Fastly
18
18
  @api_client = api_client
19
19
  end
20
20
  # Create a KV store.
21
- # Create a new KV store.
21
+ # Create a KV store.
22
22
  # @option opts [String] :location
23
- # @option opts [Store] :store
24
- # @return [StoreResponse]
25
- def create_store(opts = {})
26
- data, _status_code, _headers = create_store_with_http_info(opts)
23
+ # @option opts [KvStoreRequestCreate] :kv_store_request_create
24
+ # @return [KvStoreDetails]
25
+ def kv_store_create(opts = {})
26
+ data, _status_code, _headers = kv_store_create_with_http_info(opts)
27
27
  data
28
28
  end
29
29
 
30
30
  # Create a KV store.
31
- # Create a new KV store.
31
+ # Create a KV store.
32
32
  # @option opts [String] :location
33
- # @option opts [Store] :store
34
- # @return [Array<(StoreResponse, Integer, Hash)>] StoreResponse data, response status code and response headers
35
- def create_store_with_http_info(opts = {})
33
+ # @option opts [KvStoreRequestCreate] :kv_store_request_create
34
+ # @return [Array<(KvStoreDetails, Integer, Hash)>] KvStoreDetails data, response status code and response headers
35
+ def kv_store_create_with_http_info(opts = {})
36
36
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: KvStoreApi.create_store ...'
37
+ @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_create ...'
38
38
  end
39
39
  # unbox the parameters from the hash
40
+ allowable_values = ["US", "EU", "ASIA", "AUS"]
41
+ if @api_client.config.client_side_validation && opts[:'location'] && !allowable_values.include?(opts[:'location'])
42
+ fail ArgumentError, "invalid value for \"location\", must be one of #{allowable_values}"
43
+ end
40
44
  # resource path
41
45
  local_var_path = '/resources/stores/kv'
42
46
 
@@ -58,16 +62,16 @@ module Fastly
58
62
  form_params = opts[:form_params] || {}
59
63
 
60
64
  # http body (model)
61
- post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'store'])
65
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'kv_store_request_create'])
62
66
 
63
67
  # return_type
64
- return_type = opts[:debug_return_type] || 'StoreResponse'
68
+ return_type = opts[:debug_return_type] || 'KvStoreDetails'
65
69
 
66
70
  # auth_names
67
71
  auth_names = opts[:debug_auth_names] || ['token']
68
72
 
69
73
  new_options = opts.merge(
70
- :operation => :"KvStoreApi.create_store",
74
+ :operation => :"KvStoreApi.kv_store_create",
71
75
  :header_params => header_params,
72
76
  :query_params => query_params,
73
77
  :form_params => form_params,
@@ -78,33 +82,33 @@ module Fastly
78
82
 
79
83
  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
80
84
  if @api_client.config.debugging
81
- @api_client.config.logger.debug "API called: KvStoreApi#create_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
85
+ @api_client.config.logger.debug "API called: KvStoreApi#kv_store_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
82
86
  end
83
87
  return data, status_code, headers
84
88
  end
85
89
 
86
90
  # Delete a KV store.
87
- # 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).
91
+ # 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.
88
92
  # @option opts [String] :store_id (required)
89
93
  # @return [nil]
90
- def delete_store(opts = {})
91
- delete_store_with_http_info(opts)
94
+ def kv_store_delete(opts = {})
95
+ kv_store_delete_with_http_info(opts)
92
96
  nil
93
97
  end
94
98
 
95
99
  # Delete a KV store.
96
- # A KV store must be empty before it can be deleted. Deleting a KV store that still contains keys will result in a &#x60;409&#x60; (Conflict).
100
+ # 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 &#x60;409&#x60; status code.
97
101
  # @option opts [String] :store_id (required)
98
102
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
99
- def delete_store_with_http_info(opts = {})
103
+ def kv_store_delete_with_http_info(opts = {})
100
104
  if @api_client.config.debugging
101
- @api_client.config.logger.debug 'Calling API: KvStoreApi.delete_store ...'
105
+ @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_delete ...'
102
106
  end
103
107
  # unbox the parameters from the hash
104
108
  store_id = opts[:'store_id']
105
109
  # verify the required parameter 'store_id' is set
106
110
  if @api_client.config.client_side_validation && store_id.nil?
107
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreApi.delete_store"
111
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreApi.kv_store_delete"
108
112
  end
109
113
  # resource path
110
114
  local_var_path = '/resources/stores/kv/{store_id}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
@@ -128,7 +132,7 @@ module Fastly
128
132
  auth_names = opts[:debug_auth_names] || ['token']
129
133
 
130
134
  new_options = opts.merge(
131
- :operation => :"KvStoreApi.delete_store",
135
+ :operation => :"KvStoreApi.kv_store_delete",
132
136
  :header_params => header_params,
133
137
  :query_params => query_params,
134
138
  :form_params => form_params,
@@ -139,33 +143,33 @@ module Fastly
139
143
 
140
144
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
141
145
  if @api_client.config.debugging
142
- @api_client.config.logger.debug "API called: KvStoreApi#delete_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
146
+ @api_client.config.logger.debug "API called: KvStoreApi#kv_store_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
143
147
  end
144
148
  return data, status_code, headers
145
149
  end
146
150
 
147
151
  # Describe a KV store.
148
- # Get a KV store by ID.
152
+ # Get details of a KV store.
149
153
  # @option opts [String] :store_id (required)
150
- # @return [StoreResponse]
151
- def get_store(opts = {})
152
- data, _status_code, _headers = get_store_with_http_info(opts)
154
+ # @return [KvStoreDetails]
155
+ def kv_store_get(opts = {})
156
+ data, _status_code, _headers = kv_store_get_with_http_info(opts)
153
157
  data
154
158
  end
155
159
 
156
160
  # Describe a KV store.
157
- # Get a KV store by ID.
161
+ # Get details of a KV store.
158
162
  # @option opts [String] :store_id (required)
159
- # @return [Array<(StoreResponse, Integer, Hash)>] StoreResponse data, response status code and response headers
160
- def get_store_with_http_info(opts = {})
163
+ # @return [Array<(KvStoreDetails, Integer, Hash)>] KvStoreDetails data, response status code and response headers
164
+ def kv_store_get_with_http_info(opts = {})
161
165
  if @api_client.config.debugging
162
- @api_client.config.logger.debug 'Calling API: KvStoreApi.get_store ...'
166
+ @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_get ...'
163
167
  end
164
168
  # unbox the parameters from the hash
165
169
  store_id = opts[:'store_id']
166
170
  # verify the required parameter 'store_id' is set
167
171
  if @api_client.config.client_side_validation && store_id.nil?
168
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreApi.get_store"
172
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreApi.kv_store_get"
169
173
  end
170
174
  # resource path
171
175
  local_var_path = '/resources/stores/kv/{store_id}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
@@ -185,13 +189,13 @@ module Fastly
185
189
  post_body = opts[:debug_body]
186
190
 
187
191
  # return_type
188
- return_type = opts[:debug_return_type] || 'StoreResponse'
192
+ return_type = opts[:debug_return_type] || 'KvStoreDetails'
189
193
 
190
194
  # auth_names
191
195
  auth_names = opts[:debug_auth_names] || ['token']
192
196
 
193
197
  new_options = opts.merge(
194
- :operation => :"KvStoreApi.get_store",
198
+ :operation => :"KvStoreApi.kv_store_get",
195
199
  :header_params => header_params,
196
200
  :query_params => query_params,
197
201
  :form_params => form_params,
@@ -202,31 +206,35 @@ module Fastly
202
206
 
203
207
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
204
208
  if @api_client.config.debugging
205
- @api_client.config.logger.debug "API called: KvStoreApi#get_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
209
+ @api_client.config.logger.debug "API called: KvStoreApi#kv_store_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
206
210
  end
207
211
  return data, status_code, headers
208
212
  end
209
213
 
210
- # List KV stores.
211
- # Get all stores for a given customer.
214
+ # List all KV stores.
215
+ # List all KV stores.
212
216
  # @option opts [String] :cursor
213
217
  # @option opts [Integer] :limit (default to 1000)
214
218
  # @return [InlineResponse2003]
215
- def get_stores(opts = {})
216
- data, _status_code, _headers = get_stores_with_http_info(opts)
219
+ def kv_store_list(opts = {})
220
+ data, _status_code, _headers = kv_store_list_with_http_info(opts)
217
221
  data
218
222
  end
219
223
 
220
- # List KV stores.
221
- # Get all stores for a given customer.
224
+ # List all KV stores.
225
+ # List all KV stores.
222
226
  # @option opts [String] :cursor
223
227
  # @option opts [Integer] :limit (default to 1000)
224
228
  # @return [Array<(InlineResponse2003, Integer, Hash)>] InlineResponse2003 data, response status code and response headers
225
- def get_stores_with_http_info(opts = {})
229
+ def kv_store_list_with_http_info(opts = {})
226
230
  if @api_client.config.debugging
227
- @api_client.config.logger.debug 'Calling API: KvStoreApi.get_stores ...'
231
+ @api_client.config.logger.debug 'Calling API: KvStoreApi.kv_store_list ...'
228
232
  end
229
233
  # unbox the parameters from the hash
234
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
235
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling KvStoreApi.kv_store_list, must be greater than or equal to 1.'
236
+ end
237
+
230
238
  # resource path
231
239
  local_var_path = '/resources/stores/kv'
232
240
 
@@ -253,7 +261,7 @@ module Fastly
253
261
  auth_names = opts[:debug_auth_names] || ['token']
254
262
 
255
263
  new_options = opts.merge(
256
- :operation => :"KvStoreApi.get_stores",
264
+ :operation => :"KvStoreApi.kv_store_list",
257
265
  :header_params => header_params,
258
266
  :query_params => query_params,
259
267
  :form_params => form_params,
@@ -264,7 +272,7 @@ module Fastly
264
272
 
265
273
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
266
274
  if @api_client.config.debugging
267
- @api_client.config.logger.debug "API called: KvStoreApi#get_stores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
275
+ @api_client.config.logger.debug "API called: KvStoreApi#kv_store_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
268
276
  end
269
277
  return data, status_code, headers
270
278
  end
@@ -17,44 +17,50 @@ module Fastly
17
17
  def initialize(api_client = ApiClient.default)
18
18
  @api_client = api_client
19
19
  end
20
- # Delete kv store item.
21
- # Delete an item from an kv store
20
+ # Delete an item.
21
+ # Delete an item.
22
22
  # @option opts [String] :store_id (required)
23
- # @option opts [String] :key_name (required)
23
+ # @option opts [String] :key (required)
24
+ # @option opts [Integer] :if_generation_match
25
+ # @option opts [Boolean] :force (default to false)
24
26
  # @return [nil]
25
- def delete_key_from_store(opts = {})
26
- delete_key_from_store_with_http_info(opts)
27
+ def kv_store_delete_item(opts = {})
28
+ kv_store_delete_item_with_http_info(opts)
27
29
  nil
28
30
  end
29
31
 
30
- # Delete kv store item.
31
- # Delete an item from an kv store
32
+ # Delete an item.
33
+ # Delete an item.
32
34
  # @option opts [String] :store_id (required)
33
- # @option opts [String] :key_name (required)
35
+ # @option opts [String] :key (required)
36
+ # @option opts [Integer] :if_generation_match
37
+ # @option opts [Boolean] :force (default to false)
34
38
  # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
35
- def delete_key_from_store_with_http_info(opts = {})
39
+ def kv_store_delete_item_with_http_info(opts = {})
36
40
  if @api_client.config.debugging
37
- @api_client.config.logger.debug 'Calling API: KvStoreItemApi.delete_key_from_store ...'
41
+ @api_client.config.logger.debug 'Calling API: KvStoreItemApi.kv_store_delete_item ...'
38
42
  end
39
43
  # unbox the parameters from the hash
40
44
  store_id = opts[:'store_id']
41
- key_name = opts[:'key_name']
45
+ key = opts[:'key']
42
46
  # verify the required parameter 'store_id' is set
43
47
  if @api_client.config.client_side_validation && store_id.nil?
44
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.delete_key_from_store"
48
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.kv_store_delete_item"
45
49
  end
46
- # verify the required parameter 'key_name' is set
47
- if @api_client.config.client_side_validation && key_name.nil?
48
- fail ArgumentError, "Missing the required parameter 'key_name' when calling KvStoreItemApi.delete_key_from_store"
50
+ # verify the required parameter 'key' is set
51
+ if @api_client.config.client_side_validation && key.nil?
52
+ fail ArgumentError, "Missing the required parameter 'key' when calling KvStoreItemApi.kv_store_delete_item"
49
53
  end
50
54
  # resource path
51
- local_var_path = '/resources/stores/kv/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
55
+ local_var_path = '/resources/stores/kv/{store_id}/keys/{key}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
52
56
 
53
57
  # query parameters
54
58
  query_params = opts[:query_params] || {}
59
+ query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil?
55
60
 
56
61
  # header parameters
57
62
  header_params = opts[:header_params] || {}
63
+ header_params[:'if-generation-match'] = opts[:'if_generation_match'] if !opts[:'if_generation_match'].nil?
58
64
 
59
65
  # form parameters
60
66
  form_params = opts[:form_params] || {}
@@ -69,7 +75,7 @@ module Fastly
69
75
  auth_names = opts[:debug_auth_names] || ['token']
70
76
 
71
77
  new_options = opts.merge(
72
- :operation => :"KvStoreItemApi.delete_key_from_store",
78
+ :operation => :"KvStoreItemApi.kv_store_delete_item",
73
79
  :header_params => header_params,
74
80
  :query_params => query_params,
75
81
  :form_params => form_params,
@@ -80,53 +86,51 @@ module Fastly
80
86
 
81
87
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
82
88
  if @api_client.config.debugging
83
- @api_client.config.logger.debug "API called: KvStoreItemApi#delete_key_from_store\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
89
+ @api_client.config.logger.debug "API called: KvStoreItemApi#kv_store_delete_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
84
90
  end
85
91
  return data, status_code, headers
86
92
  end
87
93
 
88
- # List kv store keys.
89
- # List the keys of all items within an kv store.
94
+ # Get an item.
95
+ # Get an item, including its value, metadata (if any), and generation marker.
90
96
  # @option opts [String] :store_id (required)
91
- # @option opts [String] :cursor
92
- # @option opts [Integer] :limit (default to 100)
93
- # @option opts [String] :prefix
94
- # @return [InlineResponse2004]
95
- def get_keys(opts = {})
96
- data, _status_code, _headers = get_keys_with_http_info(opts)
97
+ # @option opts [String] :key (required)
98
+ # @return [File]
99
+ def kv_store_get_item(opts = {})
100
+ data, _status_code, _headers = kv_store_get_item_with_http_info(opts)
97
101
  data
98
102
  end
99
103
 
100
- # List kv store keys.
101
- # List the keys of all items within an kv store.
104
+ # Get an item.
105
+ # Get an item, including its value, metadata (if any), and generation marker.
102
106
  # @option opts [String] :store_id (required)
103
- # @option opts [String] :cursor
104
- # @option opts [Integer] :limit (default to 100)
105
- # @option opts [String] :prefix
106
- # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
107
- def get_keys_with_http_info(opts = {})
107
+ # @option opts [String] :key (required)
108
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
109
+ def kv_store_get_item_with_http_info(opts = {})
108
110
  if @api_client.config.debugging
109
- @api_client.config.logger.debug 'Calling API: KvStoreItemApi.get_keys ...'
111
+ @api_client.config.logger.debug 'Calling API: KvStoreItemApi.kv_store_get_item ...'
110
112
  end
111
113
  # unbox the parameters from the hash
112
114
  store_id = opts[:'store_id']
115
+ key = opts[:'key']
113
116
  # verify the required parameter 'store_id' is set
114
117
  if @api_client.config.client_side_validation && store_id.nil?
115
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.get_keys"
118
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.kv_store_get_item"
119
+ end
120
+ # verify the required parameter 'key' is set
121
+ if @api_client.config.client_side_validation && key.nil?
122
+ fail ArgumentError, "Missing the required parameter 'key' when calling KvStoreItemApi.kv_store_get_item"
116
123
  end
117
124
  # resource path
118
- local_var_path = '/resources/stores/kv/{store_id}/keys'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
125
+ local_var_path = '/resources/stores/kv/{store_id}/keys/{key}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
119
126
 
120
127
  # query parameters
121
128
  query_params = opts[:query_params] || {}
122
- query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
123
- query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
124
- query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
125
129
 
126
130
  # header parameters
127
131
  header_params = opts[:header_params] || {}
128
132
  # HTTP header 'Accept' (if needed)
129
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
133
+ header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
130
134
 
131
135
  # form parameters
132
136
  form_params = opts[:form_params] || {}
@@ -135,13 +139,13 @@ module Fastly
135
139
  post_body = opts[:debug_body]
136
140
 
137
141
  # return_type
138
- return_type = opts[:debug_return_type] || 'InlineResponse2004'
142
+ return_type = opts[:debug_return_type] || 'File'
139
143
 
140
144
  # auth_names
141
145
  auth_names = opts[:debug_auth_names] || ['token']
142
146
 
143
147
  new_options = opts.merge(
144
- :operation => :"KvStoreItemApi.get_keys",
148
+ :operation => :"KvStoreItemApi.kv_store_get_item",
145
149
  :header_params => header_params,
146
150
  :query_params => query_params,
147
151
  :form_params => form_params,
@@ -152,51 +156,64 @@ module Fastly
152
156
 
153
157
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
154
158
  if @api_client.config.debugging
155
- @api_client.config.logger.debug "API called: KvStoreItemApi#get_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
159
+ @api_client.config.logger.debug "API called: KvStoreItemApi#kv_store_get_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
156
160
  end
157
161
  return data, status_code, headers
158
162
  end
159
163
 
160
- # Get the value of an kv store item
161
- # Get the value associated with a key.
164
+ # List item keys.
165
+ # Lists the matching item keys (or all item keys, if no prefix is supplied).
162
166
  # @option opts [String] :store_id (required)
163
- # @option opts [String] :key_name (required)
164
- # @return [String]
165
- def get_value_for_key(opts = {})
166
- data, _status_code, _headers = get_value_for_key_with_http_info(opts)
167
+ # @option opts [String] :cursor
168
+ # @option opts [Integer] :limit (default to 100)
169
+ # @option opts [String] :prefix
170
+ # @option opts [String] :consistency (default to 'strong')
171
+ # @return [InlineResponse2004]
172
+ def kv_store_list_item_keys(opts = {})
173
+ data, _status_code, _headers = kv_store_list_item_keys_with_http_info(opts)
167
174
  data
168
175
  end
169
176
 
170
- # Get the value of an kv store item
171
- # Get the value associated with a key.
177
+ # List item keys.
178
+ # Lists the matching item keys (or all item keys, if no prefix is supplied).
172
179
  # @option opts [String] :store_id (required)
173
- # @option opts [String] :key_name (required)
174
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
175
- def get_value_for_key_with_http_info(opts = {})
180
+ # @option opts [String] :cursor
181
+ # @option opts [Integer] :limit (default to 100)
182
+ # @option opts [String] :prefix
183
+ # @option opts [String] :consistency (default to 'strong')
184
+ # @return [Array<(InlineResponse2004, Integer, Hash)>] InlineResponse2004 data, response status code and response headers
185
+ def kv_store_list_item_keys_with_http_info(opts = {})
176
186
  if @api_client.config.debugging
177
- @api_client.config.logger.debug 'Calling API: KvStoreItemApi.get_value_for_key ...'
187
+ @api_client.config.logger.debug 'Calling API: KvStoreItemApi.kv_store_list_item_keys ...'
178
188
  end
179
189
  # unbox the parameters from the hash
180
190
  store_id = opts[:'store_id']
181
- key_name = opts[:'key_name']
182
191
  # verify the required parameter 'store_id' is set
183
192
  if @api_client.config.client_side_validation && store_id.nil?
184
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.get_value_for_key"
193
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.kv_store_list_item_keys"
185
194
  end
186
- # verify the required parameter 'key_name' is set
187
- if @api_client.config.client_side_validation && key_name.nil?
188
- fail ArgumentError, "Missing the required parameter 'key_name' when calling KvStoreItemApi.get_value_for_key"
195
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
196
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling KvStoreItemApi.kv_store_list_item_keys, must be greater than or equal to 1.'
197
+ end
198
+
199
+ allowable_values = ["strong", "eventual"]
200
+ if @api_client.config.client_side_validation && opts[:'consistency'] && !allowable_values.include?(opts[:'consistency'])
201
+ fail ArgumentError, "invalid value for \"consistency\", must be one of #{allowable_values}"
189
202
  end
190
203
  # resource path
191
- local_var_path = '/resources/stores/kv/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
204
+ local_var_path = '/resources/stores/kv/{store_id}/keys'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s))
192
205
 
193
206
  # query parameters
194
207
  query_params = opts[:query_params] || {}
208
+ query_params[:'cursor'] = opts[:'cursor'] if !opts[:'cursor'].nil?
209
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
210
+ query_params[:'prefix'] = opts[:'prefix'] if !opts[:'prefix'].nil?
211
+ query_params[:'consistency'] = opts[:'consistency'] if !opts[:'consistency'].nil?
195
212
 
196
213
  # header parameters
197
214
  header_params = opts[:header_params] || {}
198
215
  # HTTP header 'Accept' (if needed)
199
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
216
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
200
217
 
201
218
  # form parameters
202
219
  form_params = opts[:form_params] || {}
@@ -205,13 +222,13 @@ module Fastly
205
222
  post_body = opts[:debug_body]
206
223
 
207
224
  # return_type
208
- return_type = opts[:debug_return_type] || 'String'
225
+ return_type = opts[:debug_return_type] || 'InlineResponse2004'
209
226
 
210
227
  # auth_names
211
228
  auth_names = opts[:debug_auth_names] || ['token']
212
229
 
213
230
  new_options = opts.merge(
214
- :operation => :"KvStoreItemApi.get_value_for_key",
231
+ :operation => :"KvStoreItemApi.kv_store_list_item_keys",
215
232
  :header_params => header_params,
216
233
  :query_params => query_params,
217
234
  :form_params => form_params,
@@ -222,59 +239,59 @@ module Fastly
222
239
 
223
240
  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
224
241
  if @api_client.config.debugging
225
- @api_client.config.logger.debug "API called: KvStoreItemApi#get_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
242
+ @api_client.config.logger.debug "API called: KvStoreItemApi#kv_store_list_item_keys\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
226
243
  end
227
244
  return data, status_code, headers
228
245
  end
229
246
 
230
- # Insert an item into an kv store
231
- # Set a new value for a new or existing key in an kv store.
247
+ # Insert or update an item.
248
+ # Inserts or updates an item's value and metadata.
232
249
  # @option opts [String] :store_id (required)
233
- # @option opts [String] :key_name (required)
250
+ # @option opts [String] :key (required)
234
251
  # @option opts [Integer] :if_generation_match
235
252
  # @option opts [Integer] :time_to_live_sec
236
253
  # @option opts [String] :metadata
237
- # @option opts [Boolean] :add
238
- # @option opts [Boolean] :append
239
- # @option opts [Boolean] :prepend
240
- # @option opts [Boolean] :background_fetch
241
- # @option opts [String] :body
242
- # @return [String]
243
- def set_value_for_key(opts = {})
244
- data, _status_code, _headers = set_value_for_key_with_http_info(opts)
245
- data
254
+ # @option opts [Boolean] :add (default to false)
255
+ # @option opts [Boolean] :append (default to false)
256
+ # @option opts [Boolean] :prepend (default to false)
257
+ # @option opts [Boolean] :background_fetch (default to false)
258
+ # @option opts [File] :body
259
+ # @return [nil]
260
+ def kv_store_upsert_item(opts = {})
261
+ kv_store_upsert_item_with_http_info(opts)
262
+ nil
246
263
  end
247
264
 
248
- # Insert an item into an kv store
249
- # Set a new value for a new or existing key in an kv store.
265
+ # Insert or update an item.
266
+ # Inserts or updates an item&#39;s value and metadata.
250
267
  # @option opts [String] :store_id (required)
251
- # @option opts [String] :key_name (required)
268
+ # @option opts [String] :key (required)
252
269
  # @option opts [Integer] :if_generation_match
253
270
  # @option opts [Integer] :time_to_live_sec
254
271
  # @option opts [String] :metadata
255
- # @option opts [Boolean] :add
256
- # @option opts [Boolean] :append
257
- # @option opts [Boolean] :prepend
258
- # @option opts [Boolean] :background_fetch
259
- # @option opts [String] :body
260
- # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
261
- def set_value_for_key_with_http_info(opts = {})
272
+ # @option opts [Boolean] :add (default to false)
273
+ # @option opts [Boolean] :append (default to false)
274
+ # @option opts [Boolean] :prepend (default to false)
275
+ # @option opts [Boolean] :background_fetch (default to false)
276
+ # @option opts [File] :body
277
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
278
+ def kv_store_upsert_item_with_http_info(opts = {})
262
279
  if @api_client.config.debugging
263
- @api_client.config.logger.debug 'Calling API: KvStoreItemApi.set_value_for_key ...'
280
+ @api_client.config.logger.debug 'Calling API: KvStoreItemApi.kv_store_upsert_item ...'
264
281
  end
265
282
  # unbox the parameters from the hash
266
283
  store_id = opts[:'store_id']
267
- key_name = opts[:'key_name']
284
+ key = opts[:'key']
268
285
  # verify the required parameter 'store_id' is set
269
286
  if @api_client.config.client_side_validation && store_id.nil?
270
- fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.set_value_for_key"
287
+ fail ArgumentError, "Missing the required parameter 'store_id' when calling KvStoreItemApi.kv_store_upsert_item"
271
288
  end
272
- # verify the required parameter 'key_name' is set
273
- if @api_client.config.client_side_validation && key_name.nil?
274
- fail ArgumentError, "Missing the required parameter 'key_name' when calling KvStoreItemApi.set_value_for_key"
289
+ # verify the required parameter 'key' is set
290
+ if @api_client.config.client_side_validation && key.nil?
291
+ fail ArgumentError, "Missing the required parameter 'key' when calling KvStoreItemApi.kv_store_upsert_item"
275
292
  end
276
293
  # resource path
277
- local_var_path = '/resources/stores/kv/{store_id}/keys/{key_name}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key_name' + '}', CGI.escape(key_name.to_s))
294
+ local_var_path = '/resources/stores/kv/{store_id}/keys/{key}'.sub('{' + 'store_id' + '}', CGI.escape(store_id.to_s)).sub('{' + 'key' + '}', CGI.escape(key.to_s))
278
295
 
279
296
  # query parameters
280
297
  query_params = opts[:query_params] || {}
@@ -285,8 +302,6 @@ module Fastly
285
302
 
286
303
  # header parameters
287
304
  header_params = opts[:header_params] || {}
288
- # HTTP header 'Accept' (if needed)
289
- header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream'])
290
305
  # HTTP header 'Content-Type'
291
306
  content_type = @api_client.select_header_content_type(['application/octet-stream'])
292
307
  if !content_type.nil?
@@ -303,13 +318,13 @@ module Fastly
303
318
  post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
304
319
 
305
320
  # return_type
306
- return_type = opts[:debug_return_type] || 'String'
321
+ return_type = opts[:debug_return_type]
307
322
 
308
323
  # auth_names
309
324
  auth_names = opts[:debug_auth_names] || ['token']
310
325
 
311
326
  new_options = opts.merge(
312
- :operation => :"KvStoreItemApi.set_value_for_key",
327
+ :operation => :"KvStoreItemApi.kv_store_upsert_item",
313
328
  :header_params => header_params,
314
329
  :query_params => query_params,
315
330
  :form_params => form_params,
@@ -320,7 +335,7 @@ module Fastly
320
335
 
321
336
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
322
337
  if @api_client.config.debugging
323
- @api_client.config.logger.debug "API called: KvStoreItemApi#set_value_for_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
338
+ @api_client.config.logger.debug "API called: KvStoreItemApi#kv_store_upsert_item\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
324
339
  end
325
340
  return data, status_code, headers
326
341
  end