fastly 8.0.1 → 8.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +223 -130
  3. data/Gemfile.lock +1 -1
  4. data/README.md +19 -7
  5. data/docs/{ErrorResponse.md → AutomationTokenErrorResponse.md} +1 -1
  6. data/docs/AutomationTokensApi.md +2 -2
  7. data/docs/Backend.md +5 -1
  8. data/docs/BackendApi.md +20 -4
  9. data/docs/BackendResponse.md +5 -1
  10. data/docs/BillingInvoicesApi.md +96 -0
  11. data/docs/Director.md +1 -1
  12. data/docs/DirectorApi.md +2 -2
  13. data/docs/DirectorResponse.md +1 -1
  14. data/docs/DomainInspectorHistoricalApi.md +4 -4
  15. data/docs/DomainInspectorRealtimeEntry.md +1 -1
  16. data/docs/Error.md +13 -0
  17. data/docs/ErrorResponseData.md +11 -0
  18. data/docs/Invoice.md +18 -0
  19. data/docs/InvoiceResponse.md +18 -0
  20. data/docs/Invoicelineitems.md +18 -0
  21. data/docs/KvStoreApi.md +1 -1
  22. data/docs/ListInvoicesResponse.md +11 -0
  23. data/docs/Listinvoices.md +11 -0
  24. data/docs/LoggingScalyrAdditional.md +1 -1
  25. data/docs/LoggingScalyrApi.md +4 -4
  26. data/docs/LoggingScalyrResponse.md +1 -1
  27. data/docs/Metadata.md +13 -0
  28. data/docs/OriginInspectorHistoricalApi.md +4 -4
  29. data/docs/OriginInspectorRealtimeEntry.md +1 -1
  30. data/docs/PoolAdditional.md +1 -1
  31. data/docs/PoolApi.md +4 -4
  32. data/docs/PoolResponse.md +1 -1
  33. data/docs/PoolResponsePost.md +1 -1
  34. data/docs/Pop.md +2 -2
  35. data/docs/PublishApi.md +1 -1
  36. data/docs/RealtimeEntry.md +1 -1
  37. data/docs/RealtimeEntryAggregated.md +22 -1
  38. data/docs/RealtimeMeasurements.md +22 -1
  39. data/docs/RelationshipCustomerCustomer.md +1 -1
  40. data/docs/Results.md +23 -0
  41. data/docs/SecretStoreApi.md +4 -2
  42. data/docs/SecretStoreItemApi.md +2 -2
  43. data/docs/ServiceDetail.md +1 -1
  44. data/docs/ServiceListResponse.md +2 -2
  45. data/docs/ServiceListResponseAllOf.md +2 -2
  46. data/docs/ServiceResponse.md +1 -1
  47. data/docs/ServiceResponseAllOf.md +1 -1
  48. data/docs/TlsConfigurationResponseAttributes.md +1 -1
  49. data/docs/TlsConfigurationResponseAttributesAllOf.md +1 -1
  50. data/docs/TlsCsr.md +10 -0
  51. data/docs/TlsCsrData.md +12 -0
  52. data/docs/TlsCsrDataAttributes.md +20 -0
  53. data/docs/TlsCsrErrorResponse.md +10 -0
  54. data/docs/TlsCsrResponse.md +10 -0
  55. data/docs/TlsCsrResponseAttributes.md +10 -0
  56. data/docs/TlsCsrResponseData.md +13 -0
  57. data/docs/TlsCsrsApi.md +52 -0
  58. data/docs/TlsSubscriptionResponseAttributes.md +1 -0
  59. data/docs/TlsSubscriptionResponseAttributesAllOf.md +1 -0
  60. data/docs/TokensApi.md +1 -1
  61. data/docs/TypeTlsCsr.md +9 -0
  62. data/docs/VclApi.md +1 -1
  63. data/docs/WafActiveRulesApi.md +1 -1
  64. data/lib/fastly/api/automation_tokens_api.rb +3 -3
  65. data/lib/fastly/api/backend_api.rb +28 -4
  66. data/lib/fastly/api/billing_invoices_api.rb +151 -0
  67. data/lib/fastly/api/director_api.rb +2 -2
  68. data/lib/fastly/api/domain_inspector_historical_api.rb +4 -4
  69. data/lib/fastly/api/kv_store_api.rb +2 -2
  70. data/lib/fastly/api/logging_scalyr_api.rb +4 -4
  71. data/lib/fastly/api/origin_inspector_historical_api.rb +4 -4
  72. data/lib/fastly/api/pool_api.rb +4 -4
  73. data/lib/fastly/api/publish_api.rb +2 -2
  74. data/lib/fastly/api/secret_store_api.rb +5 -2
  75. data/lib/fastly/api/secret_store_item_api.rb +2 -2
  76. data/lib/fastly/api/tls_csrs_api.rb +83 -0
  77. data/lib/fastly/api/tokens_api.rb +2 -2
  78. data/lib/fastly/api/vcl_api.rb +2 -2
  79. data/lib/fastly/api/waf_active_rules_api.rb +2 -2
  80. data/lib/fastly/configuration.rb +18 -0
  81. data/lib/fastly/models/{error_response.rb → automation_token_error_response.rb} +3 -3
  82. data/lib/fastly/models/backend.rb +45 -2
  83. data/lib/fastly/models/backend_response.rb +45 -2
  84. data/lib/fastly/models/director.rb +1 -1
  85. data/lib/fastly/models/director_response.rb +1 -1
  86. data/lib/fastly/models/domain_inspector_realtime_entry.rb +1 -1
  87. data/lib/fastly/models/error.rb +243 -0
  88. data/lib/fastly/models/error_response_data.rb +225 -0
  89. data/lib/fastly/models/event_attributes.rb +2 -2
  90. data/lib/fastly/models/invoice.rb +298 -0
  91. data/lib/fastly/models/invoice_response.rb +305 -0
  92. data/lib/fastly/models/invoicelineitems.rb +297 -0
  93. data/lib/fastly/models/list_invoices_response.rb +234 -0
  94. data/lib/fastly/models/listinvoices.rb +227 -0
  95. data/lib/fastly/models/logging_scalyr_additional.rb +1 -1
  96. data/lib/fastly/models/logging_scalyr_response.rb +1 -1
  97. data/lib/fastly/models/metadata.rb +250 -0
  98. data/lib/fastly/models/origin_inspector_realtime_entry.rb +1 -1
  99. data/lib/fastly/models/pool_additional.rb +1 -1
  100. data/lib/fastly/models/pool_response.rb +1 -1
  101. data/lib/fastly/models/pool_response_post.rb +1 -1
  102. data/lib/fastly/models/pop.rb +2 -2
  103. data/lib/fastly/models/realtime_entry.rb +1 -1
  104. data/lib/fastly/models/realtime_entry_aggregated.rb +215 -5
  105. data/lib/fastly/models/realtime_measurements.rb +215 -5
  106. data/lib/fastly/models/relationship_customer_customer.rb +2 -4
  107. data/lib/fastly/models/relationship_tls_certificate.rb +1 -1
  108. data/lib/fastly/models/relationship_tls_configuration.rb +1 -1
  109. data/lib/fastly/models/request_settings_additional.rb +1 -0
  110. data/lib/fastly/models/request_settings_response.rb +6 -0
  111. data/lib/fastly/models/request_settings_response_all_of.rb +5 -0
  112. data/lib/fastly/models/results.rb +231 -1
  113. data/lib/fastly/models/service_detail.rb +1 -1
  114. data/lib/fastly/models/service_list_response.rb +2 -2
  115. data/lib/fastly/models/service_list_response_all_of.rb +2 -2
  116. data/lib/fastly/models/service_response.rb +1 -1
  117. data/lib/fastly/models/service_response_all_of.rb +1 -1
  118. data/lib/fastly/models/tls_configuration_response_attributes.rb +1 -1
  119. data/lib/fastly/models/tls_configuration_response_attributes_all_of.rb +1 -1
  120. data/lib/fastly/models/tls_csr.rb +216 -0
  121. data/lib/fastly/models/tls_csr_data.rb +236 -0
  122. data/lib/fastly/models/tls_csr_data_attributes.rb +358 -0
  123. data/lib/fastly/models/tls_csr_error_response.rb +218 -0
  124. data/lib/fastly/models/tls_csr_response.rb +216 -0
  125. data/lib/fastly/models/tls_csr_response_attributes.rb +217 -0
  126. data/lib/fastly/models/tls_csr_response_data.rb +245 -0
  127. data/lib/fastly/models/tls_subscription_data_attributes.rb +2 -2
  128. data/lib/fastly/models/tls_subscription_response_attributes.rb +14 -4
  129. data/lib/fastly/models/tls_subscription_response_attributes_all_of.rb +14 -4
  130. data/lib/fastly/models/type_tls_csr.rb +34 -0
  131. data/lib/fastly/version.rb +1 -1
  132. data/lib/fastly.rb +19 -1
  133. data/sig.json +1 -1
  134. metadata +41 -5
@@ -251,12 +251,18 @@ module Fastly
251
251
  # Total header bytes delivered from the Fastly Image Optimizer service, including shield traffic.
252
252
  attr_accessor :imgopto_resp_header_bytes
253
253
 
254
+ # Number of responses that came from the Fastly Image Optimizer service via a shield.
255
+ attr_accessor :imgopto_shield
256
+
254
257
  # Total body bytes delivered via a shield from the Fastly Image Optimizer service.
255
258
  attr_accessor :imgopto_shield_resp_body_bytes
256
259
 
257
260
  # Total header bytes delivered via a shield from the Fastly Image Optimizer service.
258
261
  attr_accessor :imgopto_shield_resp_header_bytes
259
262
 
263
+ # Number of transforms performed by the Fastly Image Optimizer service.
264
+ attr_accessor :imgopto_transforms
265
+
260
266
  # Number of video responses that came from the Fastly Image Optimizer service.
261
267
  attr_accessor :imgvideo
262
268
 
@@ -689,6 +695,69 @@ module Fastly
689
695
  # The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution.
690
696
  attr_accessor :bot_challenges_failed
691
697
 
698
+ # The number of times the downgrade action was taken. The downgrade action restricts the client to http1.
699
+ attr_accessor :ddos_action_downgrade
700
+
701
+ # The number of connections the downgrade action was applied to. The downgrade action restricts the connection to http1.
702
+ attr_accessor :ddos_action_downgraded_connections
703
+
704
+ # Number of cache hits for a VCL service running on Compute.
705
+ attr_accessor :vcl_on_compute_hit_requests
706
+
707
+ # Number of cache misses for a VCL service running on Compute.
708
+ attr_accessor :vcl_on_compute_miss_requests
709
+
710
+ # Number of requests that passed through the CDN without being cached for a VCL service running on Compute.
711
+ attr_accessor :vcl_on_compute_pass_requests
712
+
713
+ # Number of cache errors for a VCL service running on Compute.
714
+ attr_accessor :vcl_on_compute_error_requests
715
+
716
+ # Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service running on Compute.
717
+ attr_accessor :vcl_on_compute_synth_requests
718
+
719
+ # Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service running on Compute.
720
+ attr_accessor :vcl_on_compute_edge_hit_requests
721
+
722
+ # Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service running on Compute.
723
+ attr_accessor :vcl_on_compute_edge_miss_requests
724
+
725
+ # Number of cache hits for a VCL service.
726
+ attr_accessor :all_hit_requests
727
+
728
+ # Number of cache misses for a VCL service.
729
+ attr_accessor :all_miss_requests
730
+
731
+ # Number of requests that passed through the CDN without being cached for a VCL service.
732
+ attr_accessor :all_pass_requests
733
+
734
+ # Number of cache errors for a VCL service.
735
+ attr_accessor :all_error_requests
736
+
737
+ # Number of requests that returned a synthetic response (i.e., response objects created with the `synthetic` VCL statement) for a VCL service.
738
+ attr_accessor :all_synth_requests
739
+
740
+ # Number of requests sent by end users to Fastly that resulted in a hit at the edge for a VCL service.
741
+ attr_accessor :all_edge_hit_requests
742
+
743
+ # Number of requests sent by end users to Fastly that resulted in a miss at the edge for a VCL service.
744
+ attr_accessor :all_edge_miss_requests
745
+
746
+ # Number of \"Informational\" category status codes delivered for all sources.
747
+ attr_accessor :all_status_1xx
748
+
749
+ # Number of \"Success\" status codes delivered for all sources.
750
+ attr_accessor :all_status_2xx
751
+
752
+ # Number of \"Redirection\" codes delivered for all sources.
753
+ attr_accessor :all_status_3xx
754
+
755
+ # Number of \"Client Error\" codes delivered for all sources.
756
+ attr_accessor :all_status_4xx
757
+
758
+ # Number of \"Server Error\" codes delivered for all sources.
759
+ attr_accessor :all_status_5xx
760
+
692
761
  attr_accessor :service_id
693
762
 
694
763
  # Timestamp for the start of the time period being reported
@@ -776,8 +845,10 @@ module Fastly
776
845
  :'imgopto' => :'imgopto',
777
846
  :'imgopto_resp_body_bytes' => :'imgopto_resp_body_bytes',
778
847
  :'imgopto_resp_header_bytes' => :'imgopto_resp_header_bytes',
848
+ :'imgopto_shield' => :'imgopto_shield',
779
849
  :'imgopto_shield_resp_body_bytes' => :'imgopto_shield_resp_body_bytes',
780
850
  :'imgopto_shield_resp_header_bytes' => :'imgopto_shield_resp_header_bytes',
851
+ :'imgopto_transforms' => :'imgopto_transforms',
781
852
  :'imgvideo' => :'imgvideo',
782
853
  :'imgvideo_frames' => :'imgvideo_frames',
783
854
  :'imgvideo_resp_header_bytes' => :'imgvideo_resp_header_bytes',
@@ -922,6 +993,27 @@ module Fastly
922
993
  :'bot_challenges_issued' => :'bot_challenges_issued',
923
994
  :'bot_challenges_succeeded' => :'bot_challenges_succeeded',
924
995
  :'bot_challenges_failed' => :'bot_challenges_failed',
996
+ :'ddos_action_downgrade' => :'ddos_action_downgrade',
997
+ :'ddos_action_downgraded_connections' => :'ddos_action_downgraded_connections',
998
+ :'vcl_on_compute_hit_requests' => :'vcl_on_compute_hit_requests',
999
+ :'vcl_on_compute_miss_requests' => :'vcl_on_compute_miss_requests',
1000
+ :'vcl_on_compute_pass_requests' => :'vcl_on_compute_pass_requests',
1001
+ :'vcl_on_compute_error_requests' => :'vcl_on_compute_error_requests',
1002
+ :'vcl_on_compute_synth_requests' => :'vcl_on_compute_synth_requests',
1003
+ :'vcl_on_compute_edge_hit_requests' => :'vcl_on_compute_edge_hit_requests',
1004
+ :'vcl_on_compute_edge_miss_requests' => :'vcl_on_compute_edge_miss_requests',
1005
+ :'all_hit_requests' => :'all_hit_requests',
1006
+ :'all_miss_requests' => :'all_miss_requests',
1007
+ :'all_pass_requests' => :'all_pass_requests',
1008
+ :'all_error_requests' => :'all_error_requests',
1009
+ :'all_synth_requests' => :'all_synth_requests',
1010
+ :'all_edge_hit_requests' => :'all_edge_hit_requests',
1011
+ :'all_edge_miss_requests' => :'all_edge_miss_requests',
1012
+ :'all_status_1xx' => :'all_status_1xx',
1013
+ :'all_status_2xx' => :'all_status_2xx',
1014
+ :'all_status_3xx' => :'all_status_3xx',
1015
+ :'all_status_4xx' => :'all_status_4xx',
1016
+ :'all_status_5xx' => :'all_status_5xx',
925
1017
  :'service_id' => :'service_id',
926
1018
  :'start_time' => :'start_time'
927
1019
  }
@@ -1014,8 +1106,10 @@ module Fastly
1014
1106
  :'imgopto' => :'Integer',
1015
1107
  :'imgopto_resp_body_bytes' => :'Integer',
1016
1108
  :'imgopto_resp_header_bytes' => :'Integer',
1109
+ :'imgopto_shield' => :'Integer',
1017
1110
  :'imgopto_shield_resp_body_bytes' => :'Integer',
1018
1111
  :'imgopto_shield_resp_header_bytes' => :'Integer',
1112
+ :'imgopto_transforms' => :'Integer',
1019
1113
  :'imgvideo' => :'Integer',
1020
1114
  :'imgvideo_frames' => :'Integer',
1021
1115
  :'imgvideo_resp_header_bytes' => :'Integer',
@@ -1160,6 +1254,27 @@ module Fastly
1160
1254
  :'bot_challenges_issued' => :'Integer',
1161
1255
  :'bot_challenges_succeeded' => :'Integer',
1162
1256
  :'bot_challenges_failed' => :'Integer',
1257
+ :'ddos_action_downgrade' => :'Integer',
1258
+ :'ddos_action_downgraded_connections' => :'Integer',
1259
+ :'vcl_on_compute_hit_requests' => :'Integer',
1260
+ :'vcl_on_compute_miss_requests' => :'Integer',
1261
+ :'vcl_on_compute_pass_requests' => :'Integer',
1262
+ :'vcl_on_compute_error_requests' => :'Integer',
1263
+ :'vcl_on_compute_synth_requests' => :'Integer',
1264
+ :'vcl_on_compute_edge_hit_requests' => :'Integer',
1265
+ :'vcl_on_compute_edge_miss_requests' => :'Integer',
1266
+ :'all_hit_requests' => :'Integer',
1267
+ :'all_miss_requests' => :'Integer',
1268
+ :'all_pass_requests' => :'Integer',
1269
+ :'all_error_requests' => :'Integer',
1270
+ :'all_synth_requests' => :'Integer',
1271
+ :'all_edge_hit_requests' => :'Integer',
1272
+ :'all_edge_miss_requests' => :'Integer',
1273
+ :'all_status_1xx' => :'Integer',
1274
+ :'all_status_2xx' => :'Integer',
1275
+ :'all_status_3xx' => :'Integer',
1276
+ :'all_status_4xx' => :'Integer',
1277
+ :'all_status_5xx' => :'Integer',
1163
1278
  :'service_id' => :'String',
1164
1279
  :'start_time' => :'Integer'
1165
1280
  }
@@ -1503,6 +1618,10 @@ module Fastly
1503
1618
  self.imgopto_resp_header_bytes = attributes[:'imgopto_resp_header_bytes']
1504
1619
  end
1505
1620
 
1621
+ if attributes.key?(:'imgopto_shield')
1622
+ self.imgopto_shield = attributes[:'imgopto_shield']
1623
+ end
1624
+
1506
1625
  if attributes.key?(:'imgopto_shield_resp_body_bytes')
1507
1626
  self.imgopto_shield_resp_body_bytes = attributes[:'imgopto_shield_resp_body_bytes']
1508
1627
  end
@@ -1511,6 +1630,10 @@ module Fastly
1511
1630
  self.imgopto_shield_resp_header_bytes = attributes[:'imgopto_shield_resp_header_bytes']
1512
1631
  end
1513
1632
 
1633
+ if attributes.key?(:'imgopto_transforms')
1634
+ self.imgopto_transforms = attributes[:'imgopto_transforms']
1635
+ end
1636
+
1514
1637
  if attributes.key?(:'imgvideo')
1515
1638
  self.imgvideo = attributes[:'imgvideo']
1516
1639
  end
@@ -2087,6 +2210,90 @@ module Fastly
2087
2210
  self.bot_challenges_failed = attributes[:'bot_challenges_failed']
2088
2211
  end
2089
2212
 
2213
+ if attributes.key?(:'ddos_action_downgrade')
2214
+ self.ddos_action_downgrade = attributes[:'ddos_action_downgrade']
2215
+ end
2216
+
2217
+ if attributes.key?(:'ddos_action_downgraded_connections')
2218
+ self.ddos_action_downgraded_connections = attributes[:'ddos_action_downgraded_connections']
2219
+ end
2220
+
2221
+ if attributes.key?(:'vcl_on_compute_hit_requests')
2222
+ self.vcl_on_compute_hit_requests = attributes[:'vcl_on_compute_hit_requests']
2223
+ end
2224
+
2225
+ if attributes.key?(:'vcl_on_compute_miss_requests')
2226
+ self.vcl_on_compute_miss_requests = attributes[:'vcl_on_compute_miss_requests']
2227
+ end
2228
+
2229
+ if attributes.key?(:'vcl_on_compute_pass_requests')
2230
+ self.vcl_on_compute_pass_requests = attributes[:'vcl_on_compute_pass_requests']
2231
+ end
2232
+
2233
+ if attributes.key?(:'vcl_on_compute_error_requests')
2234
+ self.vcl_on_compute_error_requests = attributes[:'vcl_on_compute_error_requests']
2235
+ end
2236
+
2237
+ if attributes.key?(:'vcl_on_compute_synth_requests')
2238
+ self.vcl_on_compute_synth_requests = attributes[:'vcl_on_compute_synth_requests']
2239
+ end
2240
+
2241
+ if attributes.key?(:'vcl_on_compute_edge_hit_requests')
2242
+ self.vcl_on_compute_edge_hit_requests = attributes[:'vcl_on_compute_edge_hit_requests']
2243
+ end
2244
+
2245
+ if attributes.key?(:'vcl_on_compute_edge_miss_requests')
2246
+ self.vcl_on_compute_edge_miss_requests = attributes[:'vcl_on_compute_edge_miss_requests']
2247
+ end
2248
+
2249
+ if attributes.key?(:'all_hit_requests')
2250
+ self.all_hit_requests = attributes[:'all_hit_requests']
2251
+ end
2252
+
2253
+ if attributes.key?(:'all_miss_requests')
2254
+ self.all_miss_requests = attributes[:'all_miss_requests']
2255
+ end
2256
+
2257
+ if attributes.key?(:'all_pass_requests')
2258
+ self.all_pass_requests = attributes[:'all_pass_requests']
2259
+ end
2260
+
2261
+ if attributes.key?(:'all_error_requests')
2262
+ self.all_error_requests = attributes[:'all_error_requests']
2263
+ end
2264
+
2265
+ if attributes.key?(:'all_synth_requests')
2266
+ self.all_synth_requests = attributes[:'all_synth_requests']
2267
+ end
2268
+
2269
+ if attributes.key?(:'all_edge_hit_requests')
2270
+ self.all_edge_hit_requests = attributes[:'all_edge_hit_requests']
2271
+ end
2272
+
2273
+ if attributes.key?(:'all_edge_miss_requests')
2274
+ self.all_edge_miss_requests = attributes[:'all_edge_miss_requests']
2275
+ end
2276
+
2277
+ if attributes.key?(:'all_status_1xx')
2278
+ self.all_status_1xx = attributes[:'all_status_1xx']
2279
+ end
2280
+
2281
+ if attributes.key?(:'all_status_2xx')
2282
+ self.all_status_2xx = attributes[:'all_status_2xx']
2283
+ end
2284
+
2285
+ if attributes.key?(:'all_status_3xx')
2286
+ self.all_status_3xx = attributes[:'all_status_3xx']
2287
+ end
2288
+
2289
+ if attributes.key?(:'all_status_4xx')
2290
+ self.all_status_4xx = attributes[:'all_status_4xx']
2291
+ end
2292
+
2293
+ if attributes.key?(:'all_status_5xx')
2294
+ self.all_status_5xx = attributes[:'all_status_5xx']
2295
+ end
2296
+
2090
2297
  if attributes.key?(:'service_id')
2091
2298
  self.service_id = attributes[:'service_id']
2092
2299
  end
@@ -2193,8 +2400,10 @@ module Fastly
2193
2400
  imgopto == o.imgopto &&
2194
2401
  imgopto_resp_body_bytes == o.imgopto_resp_body_bytes &&
2195
2402
  imgopto_resp_header_bytes == o.imgopto_resp_header_bytes &&
2403
+ imgopto_shield == o.imgopto_shield &&
2196
2404
  imgopto_shield_resp_body_bytes == o.imgopto_shield_resp_body_bytes &&
2197
2405
  imgopto_shield_resp_header_bytes == o.imgopto_shield_resp_header_bytes &&
2406
+ imgopto_transforms == o.imgopto_transforms &&
2198
2407
  imgvideo == o.imgvideo &&
2199
2408
  imgvideo_frames == o.imgvideo_frames &&
2200
2409
  imgvideo_resp_header_bytes == o.imgvideo_resp_header_bytes &&
@@ -2339,6 +2548,27 @@ module Fastly
2339
2548
  bot_challenges_issued == o.bot_challenges_issued &&
2340
2549
  bot_challenges_succeeded == o.bot_challenges_succeeded &&
2341
2550
  bot_challenges_failed == o.bot_challenges_failed &&
2551
+ ddos_action_downgrade == o.ddos_action_downgrade &&
2552
+ ddos_action_downgraded_connections == o.ddos_action_downgraded_connections &&
2553
+ vcl_on_compute_hit_requests == o.vcl_on_compute_hit_requests &&
2554
+ vcl_on_compute_miss_requests == o.vcl_on_compute_miss_requests &&
2555
+ vcl_on_compute_pass_requests == o.vcl_on_compute_pass_requests &&
2556
+ vcl_on_compute_error_requests == o.vcl_on_compute_error_requests &&
2557
+ vcl_on_compute_synth_requests == o.vcl_on_compute_synth_requests &&
2558
+ vcl_on_compute_edge_hit_requests == o.vcl_on_compute_edge_hit_requests &&
2559
+ vcl_on_compute_edge_miss_requests == o.vcl_on_compute_edge_miss_requests &&
2560
+ all_hit_requests == o.all_hit_requests &&
2561
+ all_miss_requests == o.all_miss_requests &&
2562
+ all_pass_requests == o.all_pass_requests &&
2563
+ all_error_requests == o.all_error_requests &&
2564
+ all_synth_requests == o.all_synth_requests &&
2565
+ all_edge_hit_requests == o.all_edge_hit_requests &&
2566
+ all_edge_miss_requests == o.all_edge_miss_requests &&
2567
+ all_status_1xx == o.all_status_1xx &&
2568
+ all_status_2xx == o.all_status_2xx &&
2569
+ all_status_3xx == o.all_status_3xx &&
2570
+ all_status_4xx == o.all_status_4xx &&
2571
+ all_status_5xx == o.all_status_5xx &&
2342
2572
  service_id == o.service_id &&
2343
2573
  start_time == o.start_time
2344
2574
  end
@@ -2352,7 +2582,7 @@ module Fastly
2352
2582
  # Calculates hash code according to all attributes.
2353
2583
  # @return [Integer] Hash code
2354
2584
  def hash
2355
- [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, service_id, start_time].hash
2585
+ [requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgopto_transforms, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, ddos_action_downgrade, ddos_action_downgraded_connections, vcl_on_compute_hit_requests, vcl_on_compute_miss_requests, vcl_on_compute_pass_requests, vcl_on_compute_error_requests, vcl_on_compute_synth_requests, vcl_on_compute_edge_hit_requests, vcl_on_compute_edge_miss_requests, all_hit_requests, all_miss_requests, all_pass_requests, all_error_requests, all_synth_requests, all_edge_hit_requests, all_edge_miss_requests, all_status_1xx, all_status_2xx, all_status_3xx, all_status_4xx, all_status_5xx, service_id, start_time].hash
2356
2586
  end
2357
2587
 
2358
2588
  # Builds the object from hash
@@ -42,7 +42,7 @@ module Fastly
42
42
  # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated.
43
43
  attr_accessor :paused
44
44
 
45
- # A list of [versions](/reference/api/services/version/) associated with the service.
45
+ # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service.
46
46
  attr_accessor :versions
47
47
 
48
48
  attr_accessor :active_version
@@ -36,10 +36,10 @@ module Fastly
36
36
 
37
37
  attr_accessor :id
38
38
 
39
- # Current [version](/reference/api/services/version/) of the service.
39
+ # Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service.
40
40
  attr_accessor :version
41
41
 
42
- # A list of [versions](/reference/api/services/version/) associated with the service.
42
+ # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service.
43
43
  attr_accessor :versions
44
44
 
45
45
  class EnumAttributeValidator
@@ -15,10 +15,10 @@ module Fastly
15
15
  class ServiceListResponseAllOf
16
16
  attr_accessor :id
17
17
 
18
- # Current [version](/reference/api/services/version/) of the service.
18
+ # Current [version](https://www.fastly.com/documentation/reference/api/services/version/) of the service.
19
19
  attr_accessor :version
20
20
 
21
- # A list of [versions](/reference/api/services/version/) associated with the service.
21
+ # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service.
22
22
  attr_accessor :versions
23
23
 
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -42,7 +42,7 @@ module Fastly
42
42
  # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated.
43
43
  attr_accessor :paused
44
44
 
45
- # A list of [versions](/reference/api/services/version/) associated with the service.
45
+ # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service.
46
46
  attr_accessor :versions
47
47
 
48
48
  class EnumAttributeValidator
@@ -21,7 +21,7 @@ module Fastly
21
21
  # Whether the service is paused. Services are paused due to a lack of traffic for an extended period of time. Services are resumed either when a draft version is activated or a locked version is cloned and reactivated.
22
22
  attr_accessor :paused
23
23
 
24
- # A list of [versions](/reference/api/services/version/) associated with the service.
24
+ # A list of [versions](https://www.fastly.com/documentation/reference/api/services/version/) associated with the service.
25
25
  attr_accessor :versions
26
26
 
27
27
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -22,7 +22,7 @@ module Fastly
22
22
  # Date and time in ISO 8601 format.
23
23
  attr_accessor :updated_at
24
24
 
25
- # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/).
25
+ # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/).
26
26
  attr_accessor :default
27
27
 
28
28
  # HTTP protocols available on your configuration.
@@ -13,7 +13,7 @@ require 'time'
13
13
 
14
14
  module Fastly
15
15
  class TlsConfigurationResponseAttributesAllOf
16
- # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](/reference/api/tls/custom-certs/activations/).
16
+ # Signifies whether or not Fastly will use this configuration as a default when creating a new [TLS Activation](https://www.fastly.com/documentation/reference/api/tls/custom-certs/activations/).
17
17
  attr_accessor :default
18
18
 
19
19
  # HTTP protocols available on your configuration.
@@ -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://developer.fastly.com/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 TlsCsr
16
+ attr_accessor :data
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'data' => :'data'
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
+ :'data' => :'TlsCsrData'
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::TlsCsr` 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::TlsCsr`. 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?(:'data')
59
+ self.data = attributes[:'data']
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
+ data == o.data
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
+ [data].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