fastly 9.0.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 (289) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +42 -19
  3. data/Gemfile.lock +3 -3
  4. data/README.md +49 -42
  5. data/docs/AclsInComputeApi.md +2 -2
  6. data/docs/AiAcceleratorResponseBodyEnable.md +12 -0
  7. data/docs/AiAcceleratorResponseCustomer.md +10 -0
  8. data/docs/AiAcceleratorResponseCustomerCustomer.md +11 -0
  9. data/docs/AiAcceleratorResponseLinks.md +10 -0
  10. data/docs/AiAcceleratorResponseLinksLinks.md +10 -0
  11. data/docs/AiAcceleratorResponseProduct.md +10 -0
  12. data/docs/AiAcceleratorResponseProductProduct.md +11 -0
  13. data/docs/Backend.md +1 -1
  14. data/docs/BackendApi.md +4 -4
  15. data/docs/BackendResponse.md +1 -1
  16. data/docs/BillingUsageMetricsApi.md +8 -8
  17. data/docs/BotManagementResponseBodyEnable.md +12 -0
  18. data/docs/BotManagementResponseLinks.md +10 -0
  19. data/docs/BotManagementResponseLinksLinks.md +11 -0
  20. data/docs/BotManagementResponseProduct.md +10 -0
  21. data/docs/BotManagementResponseProductProduct.md +11 -0
  22. data/docs/BotManagementResponseService.md +10 -0
  23. data/docs/{EnabledProductResponseService.md → BotManagementResponseServiceService.md} +1 -1
  24. data/docs/BrotliCompressionResponseBodyEnable.md +12 -0
  25. data/docs/BrotliCompressionResponseLinks.md +10 -0
  26. data/docs/BrotliCompressionResponseLinksLinks.md +11 -0
  27. data/docs/BrotliCompressionResponseProduct.md +10 -0
  28. data/docs/BrotliCompressionResponseProductProduct.md +11 -0
  29. data/docs/BrotliCompressionResponseService.md +10 -0
  30. data/docs/ComputeAclList.md +11 -0
  31. data/docs/{ReadOnlyServiceId.md → ComputeAclListMeta.md} +2 -1
  32. data/docs/ComputeAclLookup.md +1 -2
  33. data/docs/{ReadOnlyVersion.md → DdosProtectionRequestUpdateConfiguration.md} +2 -1
  34. data/docs/DdosProtectionResponseConfiguration.md +10 -0
  35. data/docs/{Store.md → DdosProtectionResponseConfigurationConfiguration.md} +2 -2
  36. data/docs/DdosProtectionResponseConfigure.md +13 -0
  37. data/docs/DdosProtectionResponseEnable.md +12 -0
  38. data/docs/DdosProtectionResponseLinks.md +10 -0
  39. data/docs/DdosProtectionResponseLinksLinks.md +11 -0
  40. data/docs/DdosProtectionResponseProduct.md +10 -0
  41. data/docs/DdosProtectionResponseProductProduct.md +11 -0
  42. data/docs/DdosProtectionResponseService.md +10 -0
  43. data/docs/DomainInspectorMeasurements.md +2 -0
  44. data/docs/DomainInspectorResponseBodyEnable.md +12 -0
  45. data/docs/DomainInspectorResponseLinks.md +10 -0
  46. data/docs/DomainInspectorResponseLinksLinks.md +11 -0
  47. data/docs/DomainInspectorResponseProduct.md +10 -0
  48. data/docs/{InlineResponse2003Meta.md → DomainInspectorResponseProductProduct.md} +3 -3
  49. data/docs/DomainInspectorResponseService.md +10 -0
  50. data/docs/FanoutResponseBodyEnable.md +12 -0
  51. data/docs/FanoutResponseLinks.md +10 -0
  52. data/docs/{EnabledProductResponseLinks.md → FanoutResponseLinksLinks.md} +1 -1
  53. data/docs/FanoutResponseProduct.md +10 -0
  54. data/docs/{EnabledProductResponseProduct.md → FanoutResponseProductProduct.md} +1 -1
  55. data/docs/FanoutResponseService.md +10 -0
  56. data/docs/ImageOptimizerResponseBodyEnable.md +12 -0
  57. data/docs/ImageOptimizerResponseLinks.md +10 -0
  58. data/docs/ImageOptimizerResponseLinksLinks.md +11 -0
  59. data/docs/ImageOptimizerResponseProduct.md +10 -0
  60. data/docs/ImageOptimizerResponseProductProduct.md +11 -0
  61. data/docs/ImageOptimizerResponseService.md +10 -0
  62. data/docs/InlineResponse2003.md +2 -2
  63. data/docs/InlineResponse2004.md +1 -1
  64. data/docs/KvStoreApi.md +30 -30
  65. data/docs/{Batch.md → KvStoreBatchResponse.md} +2 -2
  66. data/docs/{BatchErrors.md → KvStoreBatchResponseErrors.md} +4 -4
  67. data/docs/{StoreResponse.md → KvStoreDetails.md} +2 -2
  68. data/docs/KvStoreItemApi.md +55 -52
  69. data/docs/KvStoreRequestCreate.md +10 -0
  70. data/docs/KvStoreUpsertBatch.md +14 -0
  71. data/docs/LogExplorerInsightsResponseBodyEnable.md +12 -0
  72. data/docs/LogExplorerInsightsResponseLinks.md +10 -0
  73. data/docs/LogExplorerInsightsResponseLinksLinks.md +11 -0
  74. data/docs/LogExplorerInsightsResponseProduct.md +10 -0
  75. data/docs/LogExplorerInsightsResponseProductProduct.md +11 -0
  76. data/docs/LogExplorerInsightsResponseService.md +10 -0
  77. data/docs/{LegacyWafTag.md → NgwafRequestEnable.md} +2 -2
  78. data/docs/NgwafRequestUpdateConfiguration.md +11 -0
  79. data/docs/NgwafResponseConfiguration.md +10 -0
  80. data/docs/{ConfiguredProductResponseConfiguration.md → NgwafResponseConfigurationConfiguration.md} +2 -2
  81. data/docs/NgwafResponseConfigure.md +13 -0
  82. data/docs/NgwafResponseEnable.md +12 -0
  83. data/docs/NgwafResponseLinks.md +10 -0
  84. data/docs/{ConfiguredProductResponseLinks.md → NgwafResponseLinksLinks.md} +1 -1
  85. data/docs/{InlineResponse2004Meta.md → NgwafResponseProduct.md} +2 -3
  86. data/docs/{ConfiguredProductResponseProduct.md → NgwafResponseProductProduct.md} +1 -1
  87. data/docs/NgwafResponseService.md +10 -0
  88. data/docs/ObjectStorageResponseBodyEnable.md +12 -0
  89. data/docs/ObjectStorageResponseCustomer.md +10 -0
  90. data/docs/ObjectStorageResponseLinks.md +10 -0
  91. data/docs/ObjectStorageResponseLinksLinks.md +10 -0
  92. data/docs/ObjectStorageResponseProduct.md +10 -0
  93. data/docs/ObjectStorageResponseProductProduct.md +11 -0
  94. data/docs/OriginInspectorMeasurements.md +4 -0
  95. data/docs/OriginInspectorResponseBodyEnable.md +12 -0
  96. data/docs/OriginInspectorResponseLinks.md +10 -0
  97. data/docs/OriginInspectorResponseLinksLinks.md +11 -0
  98. data/docs/OriginInspectorResponseProduct.md +10 -0
  99. data/docs/OriginInspectorResponseProductProduct.md +11 -0
  100. data/docs/OriginInspectorResponseService.md +10 -0
  101. data/docs/OriginInspectorValues.md +4 -0
  102. data/docs/ProductAiAcceleratorApi.md +115 -0
  103. data/docs/ProductBotManagementApi.md +130 -0
  104. data/docs/ProductBrotliCompressionApi.md +130 -0
  105. data/docs/ProductDdosProtectionApi.md +208 -0
  106. data/docs/ProductDomainInspectorApi.md +130 -0
  107. data/docs/ProductFanoutApi.md +130 -0
  108. data/docs/ProductImageOptimizerApi.md +130 -0
  109. data/docs/ProductLogExplorerInsightsApi.md +130 -0
  110. data/docs/ProductNgwafApi.md +210 -0
  111. data/docs/ProductObjectStorageApi.md +115 -0
  112. data/docs/ProductOriginInspectorApi.md +130 -0
  113. data/docs/ProductWebsocketsApi.md +130 -0
  114. data/docs/RealtimeEntryAggregated.md +18 -3
  115. data/docs/RealtimeMeasurements.md +18 -3
  116. data/docs/Results.md +18 -3
  117. data/docs/SnippetApi.md +15 -15
  118. data/docs/Values.md +2 -0
  119. data/docs/WebsocketsResponseBodyEnable.md +12 -0
  120. data/docs/WebsocketsResponseLinks.md +10 -0
  121. data/docs/WebsocketsResponseLinksLinks.md +11 -0
  122. data/docs/WebsocketsResponseProduct.md +10 -0
  123. data/docs/WebsocketsResponseProductProduct.md +11 -0
  124. data/docs/WebsocketsResponseService.md +10 -0
  125. data/lib/fastly/api/acls_in_compute_api.rb +3 -3
  126. data/lib/fastly/api/backend_api.rb +4 -4
  127. data/lib/fastly/api/billing_usage_metrics_api.rb +26 -26
  128. data/lib/fastly/api/kv_store_api.rb +53 -45
  129. data/lib/fastly/api/kv_store_item_api.rb +114 -102
  130. data/lib/fastly/api/product_ai_accelerator_api.rb +186 -0
  131. data/lib/fastly/api/product_bot_management_api.rb +207 -0
  132. data/lib/fastly/api/product_brotli_compression_api.rb +207 -0
  133. data/lib/fastly/api/product_ddos_protection_api.rb +340 -0
  134. data/lib/fastly/api/product_domain_inspector_api.rb +207 -0
  135. data/lib/fastly/api/product_fanout_api.rb +207 -0
  136. data/lib/fastly/api/product_image_optimizer_api.rb +207 -0
  137. data/lib/fastly/api/product_log_explorer_insights_api.rb +207 -0
  138. data/lib/fastly/api/product_ngwaf_api.rb +347 -0
  139. data/lib/fastly/api/product_object_storage_api.rb +186 -0
  140. data/lib/fastly/api/product_origin_inspector_api.rb +207 -0
  141. data/lib/fastly/api/product_websockets_api.rb +207 -0
  142. data/lib/fastly/api/snippet_api.rb +35 -35
  143. data/lib/fastly/configuration.rb +248 -206
  144. data/lib/fastly/models/{legacy_waf_rule_status.rb → ai_accelerator_response_body_enable.rb} +31 -25
  145. data/lib/fastly/models/ai_accelerator_response_customer.rb +216 -0
  146. data/lib/fastly/models/ai_accelerator_response_customer_customer.rb +227 -0
  147. data/lib/fastly/models/ai_accelerator_response_links.rb +216 -0
  148. data/lib/fastly/models/ai_accelerator_response_links_links.rb +217 -0
  149. data/lib/fastly/models/ai_accelerator_response_product.rb +216 -0
  150. data/lib/fastly/models/ai_accelerator_response_product_product.rb +227 -0
  151. data/lib/fastly/models/backend.rb +1 -1
  152. data/lib/fastly/models/backend_response.rb +1 -1
  153. data/lib/fastly/models/bot_management_response_body_enable.rb +243 -0
  154. data/lib/fastly/models/bot_management_response_links.rb +216 -0
  155. data/lib/fastly/models/bot_management_response_links_links.rb +227 -0
  156. data/lib/fastly/models/bot_management_response_product.rb +216 -0
  157. data/lib/fastly/models/bot_management_response_product_product.rb +227 -0
  158. data/lib/fastly/models/bot_management_response_service.rb +216 -0
  159. data/lib/fastly/models/{enabled_product_response_service.rb → bot_management_response_service_service.rb} +3 -3
  160. data/lib/fastly/models/brotli_compression_response_body_enable.rb +243 -0
  161. data/lib/fastly/models/brotli_compression_response_links.rb +216 -0
  162. data/lib/fastly/models/brotli_compression_response_links_links.rb +227 -0
  163. data/lib/fastly/models/brotli_compression_response_product.rb +216 -0
  164. data/lib/fastly/models/brotli_compression_response_product_product.rb +227 -0
  165. data/lib/fastly/models/brotli_compression_response_service.rb +216 -0
  166. data/lib/fastly/models/{inline_response2004_meta.rb → compute_acl_list.rb} +19 -16
  167. data/lib/fastly/models/compute_acl_list_meta.rb +218 -0
  168. data/lib/fastly/models/compute_acl_lookup.rb +2 -12
  169. data/lib/fastly/models/{set_configuration.rb → ddos_protection_request_update_configuration.rb} +43 -24
  170. data/lib/fastly/models/ddos_protection_response_configuration.rb +216 -0
  171. data/lib/fastly/models/ddos_protection_response_configuration_configuration.rb +217 -0
  172. data/lib/fastly/models/ddos_protection_response_configure.rb +253 -0
  173. data/lib/fastly/models/ddos_protection_response_enable.rb +243 -0
  174. data/lib/fastly/models/ddos_protection_response_links.rb +216 -0
  175. data/lib/fastly/models/ddos_protection_response_links_links.rb +227 -0
  176. data/lib/fastly/models/ddos_protection_response_product.rb +216 -0
  177. data/lib/fastly/models/ddos_protection_response_product_product.rb +227 -0
  178. data/lib/fastly/models/ddos_protection_response_service.rb +216 -0
  179. data/lib/fastly/models/domain_inspector_measurements.rb +21 -1
  180. data/lib/fastly/models/domain_inspector_response_body_enable.rb +243 -0
  181. data/lib/fastly/models/domain_inspector_response_links.rb +216 -0
  182. data/lib/fastly/models/domain_inspector_response_links_links.rb +227 -0
  183. data/lib/fastly/models/domain_inspector_response_product.rb +216 -0
  184. data/lib/fastly/models/domain_inspector_response_product_product.rb +227 -0
  185. data/lib/fastly/models/domain_inspector_response_service.rb +216 -0
  186. data/lib/fastly/models/fanout_response_body_enable.rb +243 -0
  187. data/lib/fastly/models/{store.rb → fanout_response_links.rb} +10 -11
  188. data/lib/fastly/models/{enabled_product_response_links.rb → fanout_response_links_links.rb} +3 -3
  189. data/lib/fastly/models/fanout_response_product.rb +216 -0
  190. data/lib/fastly/models/{enabled_product_response_product.rb → fanout_response_product_product.rb} +3 -3
  191. data/lib/fastly/models/fanout_response_service.rb +216 -0
  192. data/lib/fastly/models/image_optimizer_response_body_enable.rb +243 -0
  193. data/lib/fastly/models/image_optimizer_response_links.rb +216 -0
  194. data/lib/fastly/models/image_optimizer_response_links_links.rb +227 -0
  195. data/lib/fastly/models/image_optimizer_response_product.rb +216 -0
  196. data/lib/fastly/models/image_optimizer_response_product_product.rb +227 -0
  197. data/lib/fastly/models/image_optimizer_response_service.rb +216 -0
  198. data/lib/fastly/models/inline_response2003.rb +2 -2
  199. data/lib/fastly/models/inline_response2004.rb +1 -1
  200. data/lib/fastly/models/{batch.rb → kv_store_batch_response.rb} +5 -5
  201. data/lib/fastly/models/{batch_errors.rb → kv_store_batch_response_errors.rb} +6 -6
  202. data/lib/fastly/models/{store_response.rb → kv_store_details.rb} +4 -4
  203. data/lib/fastly/models/{legacy_waf_configuration_set.rb → kv_store_request_create.rb} +10 -15
  204. data/lib/fastly/models/{legacy_waf_update_status.rb → kv_store_upsert_batch.rb} +51 -49
  205. data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +243 -0
  206. data/lib/fastly/models/log_explorer_insights_response_links.rb +216 -0
  207. data/lib/fastly/models/log_explorer_insights_response_links_links.rb +227 -0
  208. data/lib/fastly/models/log_explorer_insights_response_product.rb +216 -0
  209. data/lib/fastly/models/log_explorer_insights_response_product_product.rb +227 -0
  210. data/lib/fastly/models/log_explorer_insights_response_service.rb +216 -0
  211. data/lib/fastly/models/{set_workspace_id.rb → ngwaf_request_enable.rb} +9 -4
  212. data/lib/fastly/models/ngwaf_request_update_configuration.rb +227 -0
  213. data/lib/fastly/models/ngwaf_response_configuration.rb +216 -0
  214. data/lib/fastly/models/{configured_product_response_configuration.rb → ngwaf_response_configuration_configuration.rb} +4 -4
  215. data/lib/fastly/models/{configured_product_response.rb → ngwaf_response_configure.rb} +17 -7
  216. data/lib/fastly/models/{enabled_product_response.rb → ngwaf_response_enable.rb} +15 -6
  217. data/lib/fastly/models/{legacy_waf_tag.rb → ngwaf_response_links.rb} +10 -11
  218. data/lib/fastly/models/{configured_product_response_links.rb → ngwaf_response_links_links.rb} +3 -3
  219. data/lib/fastly/models/{read_only_version.rb → ngwaf_response_product.rb} +14 -5
  220. data/lib/fastly/models/ngwaf_response_product_product.rb +227 -0
  221. data/lib/fastly/models/ngwaf_response_service.rb +216 -0
  222. data/lib/fastly/models/object_storage_response_body_enable.rb +243 -0
  223. data/lib/fastly/models/object_storage_response_customer.rb +216 -0
  224. data/lib/fastly/models/object_storage_response_links.rb +216 -0
  225. data/lib/fastly/models/object_storage_response_links_links.rb +217 -0
  226. data/lib/fastly/models/object_storage_response_product.rb +216 -0
  227. data/lib/fastly/models/object_storage_response_product_product.rb +227 -0
  228. data/lib/fastly/models/origin_inspector_measurements.rb +41 -1
  229. data/lib/fastly/models/origin_inspector_response_body_enable.rb +243 -0
  230. data/lib/fastly/models/origin_inspector_response_links.rb +216 -0
  231. data/lib/fastly/models/origin_inspector_response_links_links.rb +227 -0
  232. data/lib/fastly/models/origin_inspector_response_product.rb +216 -0
  233. data/lib/fastly/models/origin_inspector_response_product_product.rb +227 -0
  234. data/lib/fastly/models/origin_inspector_response_service.rb +216 -0
  235. data/lib/fastly/models/origin_inspector_values.rb +41 -1
  236. data/lib/fastly/models/realtime_entry_aggregated.rb +169 -19
  237. data/lib/fastly/models/realtime_measurements.rb +169 -19
  238. data/lib/fastly/models/results.rb +169 -19
  239. data/lib/fastly/models/schemas_snippet_response.rb +1 -0
  240. data/lib/fastly/models/snippet.rb +1 -0
  241. data/lib/fastly/models/snippet_common.rb +1 -0
  242. data/lib/fastly/models/snippet_response.rb +1 -0
  243. data/lib/fastly/models/snippet_response_post.rb +1 -0
  244. data/lib/fastly/models/snippet_with_dynamic_number.rb +1 -0
  245. data/lib/fastly/models/values.rb +21 -1
  246. data/lib/fastly/models/websockets_response_body_enable.rb +243 -0
  247. data/lib/fastly/models/{read_only_service_id.rb → websockets_response_links.rb} +14 -5
  248. data/lib/fastly/models/websockets_response_links_links.rb +227 -0
  249. data/lib/fastly/models/websockets_response_product.rb +216 -0
  250. data/lib/fastly/models/{configured_product_response_product.rb → websockets_response_product_product.rb} +3 -3
  251. data/lib/fastly/models/websockets_response_service.rb +216 -0
  252. data/lib/fastly/version.rb +1 -1
  253. data/lib/fastly.rb +102 -35
  254. data/sig.json +1 -1
  255. metadata +209 -75
  256. data/docs/ConfiguredProductResponse.md +0 -13
  257. data/docs/EnabledProductResponse.md +0 -12
  258. data/docs/EnabledProductsApi.md +0 -220
  259. data/docs/LegacyWafConfigurationSet.md +0 -11
  260. data/docs/LegacyWafConfigurationSetsApi.md +0 -128
  261. data/docs/LegacyWafFirewall.md +0 -18
  262. data/docs/LegacyWafFirewallApi.md +0 -355
  263. data/docs/LegacyWafOwasp.md +0 -38
  264. data/docs/LegacyWafOwaspApi.md +0 -141
  265. data/docs/LegacyWafRule.md +0 -14
  266. data/docs/LegacyWafRuleApi.md +0 -187
  267. data/docs/LegacyWafRuleStatus.md +0 -12
  268. data/docs/LegacyWafRuleStatusApi.md +0 -205
  269. data/docs/LegacyWafRuleset.md +0 -11
  270. data/docs/LegacyWafRulesetApi.md +0 -139
  271. data/docs/LegacyWafTagApi.md +0 -61
  272. data/docs/LegacyWafUpdateStatus.md +0 -15
  273. data/docs/LegacyWafUpdateStatusApi.md +0 -105
  274. data/docs/SetConfiguration.md +0 -12
  275. data/docs/SetWorkspaceId.md +0 -10
  276. data/lib/fastly/api/enabled_products_api.rb +0 -382
  277. data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +0 -209
  278. data/lib/fastly/api/legacy_waf_firewall_api.rb +0 -627
  279. data/lib/fastly/api/legacy_waf_owasp_api.rb +0 -244
  280. data/lib/fastly/api/legacy_waf_rule_api.rb +0 -307
  281. data/lib/fastly/api/legacy_waf_rule_status_api.rb +0 -366
  282. data/lib/fastly/api/legacy_waf_ruleset_api.rb +0 -237
  283. data/lib/fastly/api/legacy_waf_tag_api.rb +0 -96
  284. data/lib/fastly/api/legacy_waf_update_status_api.rb +0 -184
  285. data/lib/fastly/models/inline_response2003_meta.rb +0 -228
  286. data/lib/fastly/models/legacy_waf_firewall.rb +0 -297
  287. data/lib/fastly/models/legacy_waf_owasp.rb +0 -527
  288. data/lib/fastly/models/legacy_waf_rule.rb +0 -257
  289. data/lib/fastly/models/legacy_waf_ruleset.rb +0 -227
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class ImageOptimizerResponseService
16
+ attr_accessor :service
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'service' => :'service'
22
+ }
23
+ end
24
+
25
+ # Returns all the JSON keys this model knows about
26
+ def self.acceptable_attributes
27
+ attribute_map.values
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.fastly_types
32
+ {
33
+ :'service' => :'BotManagementResponseServiceService'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.fastly_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ImageOptimizerResponseService` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ImageOptimizerResponseService`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'service')
59
+ self.service = attributes[:'service']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ service == o.service
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [service].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.fastly_types.each_pair do |key, type|
109
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
110
+ self.send("#{key}=", nil)
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = Fastly.const_get(type)
164
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.fastly_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -33,8 +33,8 @@ module Fastly
33
33
  # Attribute type mapping.
34
34
  def self.fastly_types
35
35
  {
36
- :'data' => :'Array<StoreResponse>',
37
- :'meta' => :'InlineResponse2003Meta'
36
+ :'data' => :'Array<KvStoreDetails>',
37
+ :'meta' => :'PaginationCursorMeta'
38
38
  }
39
39
  end
40
40
 
@@ -34,7 +34,7 @@ module Fastly
34
34
  def self.fastly_types
35
35
  {
36
36
  :'data' => :'Array<String>',
37
- :'meta' => :'InlineResponse2004Meta'
37
+ :'meta' => :'PaginationCursorMeta'
38
38
  }
39
39
  end
40
40
 
@@ -12,14 +12,14 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class Batch
15
+ class KvStoreBatchResponse
16
16
  # A descriptor for the response of the entire batch
17
17
  attr_accessor :title
18
18
 
19
19
  # If an error is present in any of the requests, this field will describe that error
20
20
  attr_accessor :type
21
21
 
22
- # Per-key errors which failed to parse, validate, or otherwise transmit
22
+ # Errors which occurred while handling the items in the request
23
23
  attr_accessor :errors
24
24
 
25
25
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -41,7 +41,7 @@ module Fastly
41
41
  {
42
42
  :'title' => :'String',
43
43
  :'type' => :'String',
44
- :'errors' => :'Array<BatchErrors>'
44
+ :'errors' => :'Array<KvStoreBatchResponseErrors>'
45
45
  }
46
46
  end
47
47
 
@@ -55,13 +55,13 @@ module Fastly
55
55
  # @param [Hash] attributes Model attributes in the form of hash
56
56
  def initialize(attributes = {})
57
57
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::Batch` initialize method"
58
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::KvStoreBatchResponse` initialize method"
59
59
  end
60
60
 
61
61
  # check to see if the attribute exists and convert string to symbol for hash key
62
62
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
63
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::Batch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
64
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::KvStoreBatchResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
65
  end
66
66
  h[k.to_sym] = v
67
67
  }
@@ -12,14 +12,14 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class BatchErrors
16
- # 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.
15
+ class KvStoreBatchResponseErrors
16
+ # The key that the error corresponds to. This field will be empty if the object or one of its fields was not parseable.
17
17
  attr_accessor :key
18
18
 
19
- # The line number of the payload on which the error occurred (starting from 0 for the first line).
19
+ # The line number of the batch request body on which the error occurred (starting from 0 for the first line).
20
20
  attr_accessor :index
21
21
 
22
- # The HTTP response code for the request, or a 400 if the request was not able to be completed.
22
+ # The HTTP response code for the item, or a 400 if the item's operation was not completed.
23
23
  attr_accessor :code
24
24
 
25
25
  # A descriptor of this particular item's error.
@@ -60,13 +60,13 @@ module Fastly
60
60
  # @param [Hash] attributes Model attributes in the form of hash
61
61
  def initialize(attributes = {})
62
62
  if (!attributes.is_a?(Hash))
63
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::BatchErrors` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::KvStoreBatchResponseErrors` initialize method"
64
64
  end
65
65
 
66
66
  # check to see if the attribute exists and convert string to symbol for hash key
67
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
68
68
  if (!self.class.attribute_map.key?(k.to_sym))
69
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BatchErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::KvStoreBatchResponseErrors`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
70
  end
71
71
  h[k.to_sym] = v
72
72
  }
@@ -12,11 +12,11 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class StoreResponse
15
+ class KvStoreDetails
16
16
  # ID of the store.
17
17
  attr_accessor :id
18
18
 
19
- # A human-readable name for the store.
19
+ # Name of the store.
20
20
  attr_accessor :name
21
21
 
22
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -50,13 +50,13 @@ module Fastly
50
50
  # @param [Hash] attributes Model attributes in the form of hash
51
51
  def initialize(attributes = {})
52
52
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::StoreResponse` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::KvStoreDetails` initialize method"
54
54
  end
55
55
 
56
56
  # check to see if the attribute exists and convert string to symbol for hash key
57
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
58
  if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::StoreResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::KvStoreDetails`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
60
  end
61
61
  h[k.to_sym] = v
62
62
  }
@@ -12,17 +12,13 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LegacyWafConfigurationSet
16
- # 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).
17
- attr_accessor :active
18
-
19
- # The name of the configuration set.
15
+ class KvStoreRequestCreate
16
+ # 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.
20
17
  attr_accessor :name
21
18
 
22
19
  # Attribute mapping from ruby-style variable name to JSON key.
23
20
  def self.attribute_map
24
21
  {
25
- :'active' => :'active',
26
22
  :'name' => :'name'
27
23
  }
28
24
  end
@@ -35,7 +31,6 @@ module Fastly
35
31
  # Attribute type mapping.
36
32
  def self.fastly_types
37
33
  {
38
- :'active' => :'Boolean',
39
34
  :'name' => :'String'
40
35
  }
41
36
  end
@@ -50,21 +45,17 @@ module Fastly
50
45
  # @param [Hash] attributes Model attributes in the form of hash
51
46
  def initialize(attributes = {})
52
47
  if (!attributes.is_a?(Hash))
53
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LegacyWafConfigurationSet` initialize method"
48
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::KvStoreRequestCreate` initialize method"
54
49
  end
55
50
 
56
51
  # check to see if the attribute exists and convert string to symbol for hash key
57
52
  attributes = attributes.each_with_object({}) { |(k, v), h|
58
53
  if (!self.class.attribute_map.key?(k.to_sym))
59
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LegacyWafConfigurationSet`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::KvStoreRequestCreate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
60
55
  end
61
56
  h[k.to_sym] = v
62
57
  }
63
58
 
64
- if attributes.key?(:'active')
65
- self.active = attributes[:'active']
66
- end
67
-
68
59
  if attributes.key?(:'name')
69
60
  self.name = attributes[:'name']
70
61
  end
@@ -74,12 +65,17 @@ module Fastly
74
65
  # @return Array for valid properties with the reasons
75
66
  def list_invalid_properties
76
67
  invalid_properties = Array.new
68
+ if @name.nil?
69
+ invalid_properties.push('invalid value for "name", name cannot be nil.')
70
+ end
71
+
77
72
  invalid_properties
78
73
  end
79
74
 
80
75
  # Check to see if the all the properties in the model are valid
81
76
  # @return true if the model is valid
82
77
  def valid?
78
+ return false if @name.nil?
83
79
  true
84
80
  end
85
81
 
@@ -88,7 +84,6 @@ module Fastly
88
84
  def ==(o)
89
85
  return true if self.equal?(o)
90
86
  self.class == o.class &&
91
- active == o.active &&
92
87
  name == o.name
93
88
  end
94
89
 
@@ -101,7 +96,7 @@ module Fastly
101
96
  # Calculates hash code according to all attributes.
102
97
  # @return [Integer] Hash code
103
98
  def hash
104
- [active, name].hash
99
+ [name].hash
105
100
  end
106
101
 
107
102
  # Builds the object from hash
@@ -12,34 +12,30 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LegacyWafUpdateStatus
16
- # Date and time that job was completed.
17
- attr_accessor :completed_at
15
+ class KvStoreUpsertBatch
16
+ # The key of the item to be added, updated, retrieved, or deleted.
17
+ attr_accessor :key
18
18
 
19
- # Date and time that job was created.
20
- attr_accessor :created_at
19
+ # Value for the item (in Base64 encoding).
20
+ attr_accessor :value
21
21
 
22
- # This field can contain data passed to the background worker as well as output from the background job.
23
- attr_accessor :data
22
+ # 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.
23
+ attr_accessor :time_to_live_sec
24
24
 
25
- # Message with information about the status of the update.
26
- attr_accessor :message
25
+ # An arbitrary data field which can contain up to 2000 bytes of data.
26
+ attr_accessor :metadata
27
27
 
28
- # Current status of the update.
29
- attr_accessor :status
30
-
31
- # Date and time that job was last updated.
32
- attr_accessor :updated_at
28
+ # 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.
29
+ attr_accessor :background_fetch
33
30
 
34
31
  # Attribute mapping from ruby-style variable name to JSON key.
35
32
  def self.attribute_map
36
33
  {
37
- :'completed_at' => :'completed_at',
38
- :'created_at' => :'created_at',
39
- :'data' => :'data',
40
- :'message' => :'message',
41
- :'status' => :'status',
42
- :'updated_at' => :'updated_at'
34
+ :'key' => :'key',
35
+ :'value' => :'value',
36
+ :'time_to_live_sec' => :'time_to_live_sec',
37
+ :'metadata' => :'metadata',
38
+ :'background_fetch' => :'background_fetch'
43
39
  }
44
40
  end
45
41
 
@@ -51,12 +47,11 @@ module Fastly
51
47
  # Attribute type mapping.
52
48
  def self.fastly_types
53
49
  {
54
- :'completed_at' => :'String',
55
- :'created_at' => :'String',
56
- :'data' => :'String',
57
- :'message' => :'String',
58
- :'status' => :'String',
59
- :'updated_at' => :'String'
50
+ :'key' => :'String',
51
+ :'value' => :'String',
52
+ :'time_to_live_sec' => :'Integer',
53
+ :'metadata' => :'String',
54
+ :'background_fetch' => :'Boolean'
60
55
  }
61
56
  end
62
57
 
@@ -70,39 +65,37 @@ module Fastly
70
65
  # @param [Hash] attributes Model attributes in the form of hash
71
66
  def initialize(attributes = {})
72
67
  if (!attributes.is_a?(Hash))
73
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LegacyWafUpdateStatus` initialize method"
68
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::KvStoreUpsertBatch` initialize method"
74
69
  end
75
70
 
76
71
  # check to see if the attribute exists and convert string to symbol for hash key
77
72
  attributes = attributes.each_with_object({}) { |(k, v), h|
78
73
  if (!self.class.attribute_map.key?(k.to_sym))
79
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LegacyWafUpdateStatus`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::KvStoreUpsertBatch`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
80
75
  end
81
76
  h[k.to_sym] = v
82
77
  }
83
78
 
84
- if attributes.key?(:'completed_at')
85
- self.completed_at = attributes[:'completed_at']
86
- end
87
-
88
- if attributes.key?(:'created_at')
89
- self.created_at = attributes[:'created_at']
79
+ if attributes.key?(:'key')
80
+ self.key = attributes[:'key']
90
81
  end
91
82
 
92
- if attributes.key?(:'data')
93
- self.data = attributes[:'data']
83
+ if attributes.key?(:'value')
84
+ self.value = attributes[:'value']
94
85
  end
95
86
 
96
- if attributes.key?(:'message')
97
- self.message = attributes[:'message']
87
+ if attributes.key?(:'time_to_live_sec')
88
+ self.time_to_live_sec = attributes[:'time_to_live_sec']
98
89
  end
99
90
 
100
- if attributes.key?(:'status')
101
- self.status = attributes[:'status']
91
+ if attributes.key?(:'metadata')
92
+ self.metadata = attributes[:'metadata']
102
93
  end
103
94
 
104
- if attributes.key?(:'updated_at')
105
- self.updated_at = attributes[:'updated_at']
95
+ if attributes.key?(:'background_fetch')
96
+ self.background_fetch = attributes[:'background_fetch']
97
+ else
98
+ self.background_fetch = false
106
99
  end
107
100
  end
108
101
 
@@ -110,12 +103,22 @@ module Fastly
110
103
  # @return Array for valid properties with the reasons
111
104
  def list_invalid_properties
112
105
  invalid_properties = Array.new
106
+ if @key.nil?
107
+ invalid_properties.push('invalid value for "key", key cannot be nil.')
108
+ end
109
+
110
+ if @value.nil?
111
+ invalid_properties.push('invalid value for "value", value cannot be nil.')
112
+ end
113
+
113
114
  invalid_properties
114
115
  end
115
116
 
116
117
  # Check to see if the all the properties in the model are valid
117
118
  # @return true if the model is valid
118
119
  def valid?
120
+ return false if @key.nil?
121
+ return false if @value.nil?
119
122
  true
120
123
  end
121
124
 
@@ -124,12 +127,11 @@ module Fastly
124
127
  def ==(o)
125
128
  return true if self.equal?(o)
126
129
  self.class == o.class &&
127
- completed_at == o.completed_at &&
128
- created_at == o.created_at &&
129
- data == o.data &&
130
- message == o.message &&
131
- status == o.status &&
132
- updated_at == o.updated_at
130
+ key == o.key &&
131
+ value == o.value &&
132
+ time_to_live_sec == o.time_to_live_sec &&
133
+ metadata == o.metadata &&
134
+ background_fetch == o.background_fetch
133
135
  end
134
136
 
135
137
  # @see the `==` method
@@ -141,7 +143,7 @@ module Fastly
141
143
  # Calculates hash code according to all attributes.
142
144
  # @return [Integer] Hash code
143
145
  def hash
144
- [completed_at, created_at, data, message, status, updated_at].hash
146
+ [key, value, time_to_live_sec, metadata, background_fetch].hash
145
147
  end
146
148
 
147
149
  # Builds the object from hash