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
@@ -12,16 +12,17 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class InlineResponse2004Meta
16
- attr_accessor :next_cursor
15
+ # An example of an ACL list response.
16
+ class ComputeAclList
17
+ attr_accessor :data
17
18
 
18
- attr_accessor :limit
19
+ attr_accessor :meta
19
20
 
20
21
  # Attribute mapping from ruby-style variable name to JSON key.
21
22
  def self.attribute_map
22
23
  {
23
- :'next_cursor' => :'next_cursor',
24
- :'limit' => :'limit'
24
+ :'data' => :'data',
25
+ :'meta' => :'meta'
25
26
  }
26
27
  end
27
28
 
@@ -33,8 +34,8 @@ module Fastly
33
34
  # Attribute type mapping.
34
35
  def self.fastly_types
35
36
  {
36
- :'next_cursor' => :'String',
37
- :'limit' => :'Integer'
37
+ :'data' => :'Array<ComputeAclCreateAclsResponse>',
38
+ :'meta' => :'ComputeAclListMeta'
38
39
  }
39
40
  end
40
41
 
@@ -48,23 +49,25 @@ module Fastly
48
49
  # @param [Hash] attributes Model attributes in the form of hash
49
50
  def initialize(attributes = {})
50
51
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InlineResponse2004Meta` initialize method"
52
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclList` initialize method"
52
53
  end
53
54
 
54
55
  # check to see if the attribute exists and convert string to symbol for hash key
55
56
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
57
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InlineResponse2004Meta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclList`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
59
  end
59
60
  h[k.to_sym] = v
60
61
  }
61
62
 
62
- if attributes.key?(:'next_cursor')
63
- self.next_cursor = attributes[:'next_cursor']
63
+ if attributes.key?(:'data')
64
+ if (value = attributes[:'data']).is_a?(Array)
65
+ self.data = value
66
+ end
64
67
  end
65
68
 
66
- if attributes.key?(:'limit')
67
- self.limit = attributes[:'limit']
69
+ if attributes.key?(:'meta')
70
+ self.meta = attributes[:'meta']
68
71
  end
69
72
  end
70
73
 
@@ -86,8 +89,8 @@ module Fastly
86
89
  def ==(o)
87
90
  return true if self.equal?(o)
88
91
  self.class == o.class &&
89
- next_cursor == o.next_cursor &&
90
- limit == o.limit
92
+ data == o.data &&
93
+ meta == o.meta
91
94
  end
92
95
 
93
96
  # @see the `==` method
@@ -99,7 +102,7 @@ module Fastly
99
102
  # Calculates hash code according to all attributes.
100
103
  # @return [Integer] Hash code
101
104
  def hash
102
- [next_cursor, limit].hash
105
+ [data, meta].hash
103
106
  end
104
107
 
105
108
  # Builds the object from hash
@@ -0,0 +1,218 @@
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
+ # Meta for the total of ACLs.
16
+ class ComputeAclListMeta
17
+ # Total of ACLs.
18
+ attr_accessor :total
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'total' => :'total'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.fastly_types
34
+ {
35
+ :'total' => :'Integer'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.fastly_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ComputeAclListMeta` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ComputeAclListMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'total')
61
+ self.total = attributes[:'total']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ total == o.total
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [total].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.fastly_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = Fastly.const_get(type)
166
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.fastly_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end
@@ -14,12 +14,9 @@ require 'time'
14
14
  module Fastly
15
15
  # Defines the structure of an ACL Lookup response.
16
16
  class ComputeAclLookup
17
- # A valid IPv4 or IPv6 address.
17
+ # A valid IPv4 or IPv6 address and prefix in CIDR notation.
18
18
  attr_accessor :prefix
19
19
 
20
- # The length of address in the IP addressing space.
21
- attr_accessor :length
22
-
23
20
  # One of \"ALLOW\" or \"BLOCK\".
24
21
  attr_accessor :action
25
22
 
@@ -27,7 +24,6 @@ module Fastly
27
24
  def self.attribute_map
28
25
  {
29
26
  :'prefix' => :'prefix',
30
- :'length' => :'length',
31
27
  :'action' => :'action'
32
28
  }
33
29
  end
@@ -41,7 +37,6 @@ module Fastly
41
37
  def self.fastly_types
42
38
  {
43
39
  :'prefix' => :'String',
44
- :'length' => :'Integer',
45
40
  :'action' => :'String'
46
41
  }
47
42
  end
@@ -71,10 +66,6 @@ module Fastly
71
66
  self.prefix = attributes[:'prefix']
72
67
  end
73
68
 
74
- if attributes.key?(:'length')
75
- self.length = attributes[:'length']
76
- end
77
-
78
69
  if attributes.key?(:'action')
79
70
  self.action = attributes[:'action']
80
71
  end
@@ -99,7 +90,6 @@ module Fastly
99
90
  return true if self.equal?(o)
100
91
  self.class == o.class &&
101
92
  prefix == o.prefix &&
102
- length == o.length &&
103
93
  action == o.action
104
94
  end
105
95
 
@@ -112,7 +102,7 @@ module Fastly
112
102
  # Calculates hash code according to all attributes.
113
103
  # @return [Integer] Hash code
114
104
  def hash
115
- [prefix, length, action].hash
105
+ [prefix, action].hash
116
106
  end
117
107
 
118
108
  # Builds the object from hash
@@ -12,21 +12,35 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class SetConfiguration
16
- # The new workspace_id. Required in the `PUT` request body when `product_id` is `ngwaf`. Optional in the `PATCH` request body for `ngwaf`.
17
- attr_accessor :workspace_id
15
+ class DdosProtectionRequestUpdateConfiguration
16
+ # Operation mode
17
+ attr_accessor :mode
18
18
 
19
- # The new traffic ramp. Optional in the `PATCH` request body for `ngwaf`.
20
- attr_accessor :traffic_ramp
19
+ class EnumAttributeValidator
20
+ attr_reader :datatype
21
+ attr_reader :allowable_values
22
+
23
+ def initialize(datatype, allowable_values)
24
+ @allowable_values = allowable_values.map do |value|
25
+ case datatype.to_s
26
+ when /Integer/i
27
+ value.to_i
28
+ when /Float/i
29
+ value.to_f
30
+ else
31
+ value
32
+ end
33
+ end
34
+ end
21
35
 
22
- # The new mode to run the product in. One of `block`, `log`, or `off`. Optional in the `PATCH` request body for `ddos_protection`.
23
- attr_accessor :mode
36
+ def valid?(value)
37
+ !value || allowable_values.include?(value)
38
+ end
39
+ end
24
40
 
25
41
  # Attribute mapping from ruby-style variable name to JSON key.
26
42
  def self.attribute_map
27
43
  {
28
- :'workspace_id' => :'workspace_id',
29
- :'traffic_ramp' => :'traffic_ramp',
30
44
  :'mode' => :'mode'
31
45
  }
32
46
  end
@@ -39,8 +53,6 @@ module Fastly
39
53
  # Attribute type mapping.
40
54
  def self.fastly_types
41
55
  {
42
- :'workspace_id' => :'String',
43
- :'traffic_ramp' => :'String',
44
56
  :'mode' => :'String'
45
57
  }
46
58
  end
@@ -55,25 +67,17 @@ module Fastly
55
67
  # @param [Hash] attributes Model attributes in the form of hash
56
68
  def initialize(attributes = {})
57
69
  if (!attributes.is_a?(Hash))
58
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SetConfiguration` initialize method"
70
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::DdosProtectionRequestUpdateConfiguration` initialize method"
59
71
  end
60
72
 
61
73
  # check to see if the attribute exists and convert string to symbol for hash key
62
74
  attributes = attributes.each_with_object({}) { |(k, v), h|
63
75
  if (!self.class.attribute_map.key?(k.to_sym))
64
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SetConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
76
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::DdosProtectionRequestUpdateConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
65
77
  end
66
78
  h[k.to_sym] = v
67
79
  }
68
80
 
69
- if attributes.key?(:'workspace_id')
70
- self.workspace_id = attributes[:'workspace_id']
71
- end
72
-
73
- if attributes.key?(:'traffic_ramp')
74
- self.traffic_ramp = attributes[:'traffic_ramp']
75
- end
76
-
77
81
  if attributes.key?(:'mode')
78
82
  self.mode = attributes[:'mode']
79
83
  end
@@ -83,22 +87,37 @@ module Fastly
83
87
  # @return Array for valid properties with the reasons
84
88
  def list_invalid_properties
85
89
  invalid_properties = Array.new
90
+ if @mode.nil?
91
+ invalid_properties.push('invalid value for "mode", mode cannot be nil.')
92
+ end
93
+
86
94
  invalid_properties
87
95
  end
88
96
 
89
97
  # Check to see if the all the properties in the model are valid
90
98
  # @return true if the model is valid
91
99
  def valid?
100
+ return false if @mode.nil?
101
+ mode_validator = EnumAttributeValidator.new('String', ["false", "log", "block"])
102
+ return false unless mode_validator.valid?(@mode)
92
103
  true
93
104
  end
94
105
 
106
+ # Custom attribute writer method checking allowed values (enum).
107
+ # @param [Object] mode Object to be assigned
108
+ def mode=(mode)
109
+ validator = EnumAttributeValidator.new('String', ["false", "log", "block"])
110
+ unless validator.valid?(mode)
111
+ fail ArgumentError, "invalid value for \"mode\", must be one of #{validator.allowable_values}."
112
+ end
113
+ @mode = mode
114
+ end
115
+
95
116
  # Checks equality by comparing each attribute.
96
117
  # @param [Object] Object to be compared
97
118
  def ==(o)
98
119
  return true if self.equal?(o)
99
120
  self.class == o.class &&
100
- workspace_id == o.workspace_id &&
101
- traffic_ramp == o.traffic_ramp &&
102
121
  mode == o.mode
103
122
  end
104
123
 
@@ -111,7 +130,7 @@ module Fastly
111
130
  # Calculates hash code according to all attributes.
112
131
  # @return [Integer] Hash code
113
132
  def hash
114
- [workspace_id, traffic_ramp, mode].hash
133
+ [mode].hash
115
134
  end
116
135
 
117
136
  # Builds the object from hash
@@ -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 DdosProtectionResponseConfiguration
16
+ attr_accessor :configuration
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'configuration' => :'configuration'
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
+ :'configuration' => :'DdosProtectionResponseConfigurationConfiguration'
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::DdosProtectionResponseConfiguration` 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::DdosProtectionResponseConfiguration`. 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?(:'configuration')
59
+ self.configuration = attributes[:'configuration']
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
+ configuration == o.configuration
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
+ [configuration].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