fastly 13.0.0 → 14.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 (250) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/Gemfile.lock +4 -4
  4. data/README.md +21 -6
  5. data/docs/AttackReport.md +19 -0
  6. data/docs/AttackSignal.md +12 -0
  7. data/docs/AttackSource.md +13 -0
  8. data/docs/Backend.md +6 -6
  9. data/docs/BackendApi.md +18 -18
  10. data/docs/BackendResponse.md +6 -6
  11. data/docs/DdosProtectionApi.md +40 -0
  12. data/docs/DdosProtectionAttributeStats.md +1 -1
  13. data/docs/DdosProtectionInvalidRequest.md +13 -0
  14. data/docs/DdosProtectionNotAuthorized.md +11 -0
  15. data/docs/DdosProtectionRule.md +1 -1
  16. data/docs/DdosProtectionRuleAllOf.md +1 -1
  17. data/docs/DdosProtectionRulePatch.md +10 -0
  18. data/docs/HistoricalApi.md +2 -0
  19. data/docs/Invitation.md +1 -1
  20. data/docs/InvitationCreateData.md +12 -0
  21. data/docs/InvitationCreateDataAllOf.md +10 -0
  22. data/docs/{InvitationResponse.md → InvitationCreateResponse.md} +1 -1
  23. data/docs/{InvitationResponseAllOf.md → InvitationCreateResponseAllOf.md} +1 -1
  24. data/docs/InvitationData.md +0 -1
  25. data/docs/InvitationResponseData.md +1 -1
  26. data/docs/InvitationsApi.md +2 -2
  27. data/docs/KvStoreApi.md +2 -0
  28. data/docs/ListAttackReport.md +11 -0
  29. data/docs/{DdosProtectionTrafficAttribute.md → ListAttackReportMeta.md} +2 -1
  30. data/docs/{DdosProtectionAction.md → ListSignalReport.md} +2 -1
  31. data/docs/LogExplorerApi.md +1 -1
  32. data/docs/LoggingAzureblobApi.md +8 -4
  33. data/docs/LoggingAzureblobResponse.md +2 -1
  34. data/docs/LoggingBigqueryAdditional.md +1 -1
  35. data/docs/LoggingBigqueryApi.md +8 -4
  36. data/docs/LoggingBigqueryResponse.md +2 -1
  37. data/docs/LoggingCloudfilesApi.md +8 -4
  38. data/docs/LoggingCloudfilesResponse.md +2 -1
  39. data/docs/LoggingCommon.md +2 -1
  40. data/docs/LoggingCommonResponse.md +2 -1
  41. data/docs/LoggingCommonResponseAllOf.md +2 -1
  42. data/docs/LoggingDatadogAdditional.md +1 -1
  43. data/docs/LoggingDatadogApi.md +8 -4
  44. data/docs/LoggingDatadogResponse.md +2 -1
  45. data/docs/LoggingDigitaloceanApi.md +8 -4
  46. data/docs/LoggingDigitaloceanResponse.md +2 -1
  47. data/docs/LoggingElasticsearchAdditional.md +1 -1
  48. data/docs/LoggingElasticsearchApi.md +8 -4
  49. data/docs/LoggingElasticsearchResponse.md +2 -1
  50. data/docs/LoggingFtpApi.md +8 -4
  51. data/docs/LoggingFtpResponse.md +2 -1
  52. data/docs/LoggingGcsApi.md +8 -4
  53. data/docs/LoggingGcsResponse.md +2 -1
  54. data/docs/LoggingGooglePubsubAdditional.md +1 -1
  55. data/docs/LoggingGooglePubsubResponse.md +2 -1
  56. data/docs/LoggingGrafanacloudlogsAdditional.md +1 -1
  57. data/docs/LoggingGrafanacloudlogsApi.md +8 -4
  58. data/docs/LoggingGrafanacloudlogsResponse.md +2 -1
  59. data/docs/LoggingHerokuApi.md +8 -4
  60. data/docs/LoggingHerokuResponse.md +2 -1
  61. data/docs/LoggingHoneycombAdditional.md +1 -1
  62. data/docs/LoggingHoneycombApi.md +8 -4
  63. data/docs/LoggingHoneycombResponse.md +2 -1
  64. data/docs/LoggingHttpsAdditional.md +1 -1
  65. data/docs/LoggingHttpsApi.md +8 -4
  66. data/docs/LoggingHttpsResponse.md +2 -1
  67. data/docs/LoggingKafkaApi.md +4 -2
  68. data/docs/LoggingKafkaResponse.md +2 -1
  69. data/docs/LoggingKafkaResponsePost.md +2 -1
  70. data/docs/LoggingKinesisAdditional.md +1 -1
  71. data/docs/LoggingKinesisApi.md +2 -2
  72. data/docs/LoggingKinesisResponse.md +1 -1
  73. data/docs/LoggingLogentriesApi.md +8 -4
  74. data/docs/LoggingLogentriesResponse.md +2 -1
  75. data/docs/LoggingLogglyApi.md +8 -4
  76. data/docs/LoggingLogglyResponse.md +2 -1
  77. data/docs/LoggingLogshuttleApi.md +8 -4
  78. data/docs/LoggingLogshuttleResponse.md +2 -1
  79. data/docs/LoggingNewrelicAdditional.md +1 -1
  80. data/docs/LoggingNewrelicApi.md +8 -4
  81. data/docs/LoggingNewrelicResponse.md +2 -1
  82. data/docs/LoggingNewrelicotlpAdditional.md +1 -1
  83. data/docs/LoggingNewrelicotlpApi.md +8 -4
  84. data/docs/LoggingNewrelicotlpResponse.md +2 -1
  85. data/docs/LoggingOpenstackApi.md +8 -4
  86. data/docs/LoggingOpenstackResponse.md +2 -1
  87. data/docs/LoggingPapertrailApi.md +8 -4
  88. data/docs/LoggingPapertrailResponse.md +2 -1
  89. data/docs/LoggingPubsubApi.md +8 -4
  90. data/docs/LoggingS3Api.md +8 -4
  91. data/docs/LoggingS3Response.md +2 -1
  92. data/docs/LoggingScalyrApi.md +8 -4
  93. data/docs/LoggingScalyrResponse.md +2 -1
  94. data/docs/LoggingSftpApi.md +8 -4
  95. data/docs/LoggingSftpResponse.md +2 -1
  96. data/docs/LoggingSplunkApi.md +8 -4
  97. data/docs/LoggingSplunkResponse.md +2 -1
  98. data/docs/LoggingSumologicApi.md +8 -4
  99. data/docs/LoggingSumologicResponse.md +2 -1
  100. data/docs/LoggingSyslogApi.md +8 -4
  101. data/docs/LoggingSyslogResponse.md +2 -1
  102. data/docs/NgwafReportsApi.md +99 -0
  103. data/docs/ObservabilityTimeseriesApi.md +67 -0
  104. data/docs/PoolAdditional.md +1 -1
  105. data/docs/PoolApi.md +8 -8
  106. data/docs/PoolResponse.md +2 -2
  107. data/docs/PoolResponseCommon.md +1 -1
  108. data/docs/PoolResponsePost.md +2 -2
  109. data/docs/PurgeApi.md +1 -1
  110. data/docs/SignalReport.md +13 -0
  111. data/docs/TimeseriesGetResponse.md +11 -0
  112. data/docs/TimeseriesMeta.md +13 -0
  113. data/docs/TimeseriesResult.md +11 -0
  114. data/docs/TlsCertificateDataAttributes.md +1 -0
  115. data/docs/TlsCsrData.md +0 -1
  116. data/docs/TlsCsrDataAttributes.md +1 -0
  117. data/docs/TlsSubscriptionsApi.md +0 -2
  118. data/docs/TopWorkspace.md +12 -0
  119. data/lib/fastly/api/backend_api.rb +24 -24
  120. data/lib/fastly/api/ddos_protection_api.rb +70 -0
  121. data/lib/fastly/api/historical_api.rb +3 -0
  122. data/lib/fastly/api/invitations_api.rb +3 -3
  123. data/lib/fastly/api/kv_store_api.rb +3 -0
  124. data/lib/fastly/api/logging_azureblob_api.rb +18 -4
  125. data/lib/fastly/api/logging_bigquery_api.rb +18 -4
  126. data/lib/fastly/api/logging_cloudfiles_api.rb +18 -4
  127. data/lib/fastly/api/logging_datadog_api.rb +18 -4
  128. data/lib/fastly/api/logging_digitalocean_api.rb +18 -4
  129. data/lib/fastly/api/logging_elasticsearch_api.rb +18 -4
  130. data/lib/fastly/api/logging_ftp_api.rb +18 -4
  131. data/lib/fastly/api/logging_gcs_api.rb +18 -4
  132. data/lib/fastly/api/logging_grafanacloudlogs_api.rb +18 -4
  133. data/lib/fastly/api/logging_heroku_api.rb +18 -4
  134. data/lib/fastly/api/logging_honeycomb_api.rb +18 -4
  135. data/lib/fastly/api/logging_https_api.rb +18 -4
  136. data/lib/fastly/api/logging_kafka_api.rb +9 -2
  137. data/lib/fastly/api/logging_kinesis_api.rb +2 -2
  138. data/lib/fastly/api/logging_logentries_api.rb +18 -4
  139. data/lib/fastly/api/logging_loggly_api.rb +18 -4
  140. data/lib/fastly/api/logging_logshuttle_api.rb +18 -4
  141. data/lib/fastly/api/logging_newrelic_api.rb +18 -4
  142. data/lib/fastly/api/logging_newrelicotlp_api.rb +18 -4
  143. data/lib/fastly/api/logging_openstack_api.rb +18 -4
  144. data/lib/fastly/api/logging_papertrail_api.rb +18 -4
  145. data/lib/fastly/api/logging_pubsub_api.rb +18 -4
  146. data/lib/fastly/api/logging_s3_api.rb +18 -4
  147. data/lib/fastly/api/logging_scalyr_api.rb +18 -4
  148. data/lib/fastly/api/logging_sftp_api.rb +18 -4
  149. data/lib/fastly/api/logging_splunk_api.rb +18 -4
  150. data/lib/fastly/api/logging_sumologic_api.rb +18 -4
  151. data/lib/fastly/api/logging_syslog_api.rb +18 -4
  152. data/lib/fastly/api/ngwaf_reports_api.rb +161 -0
  153. data/lib/fastly/api/{observability_timeseries_for_logs_api.rb → observability_timeseries_api.rb} +38 -43
  154. data/lib/fastly/api/pool_api.rb +8 -8
  155. data/lib/fastly/api/purge_api.rb +2 -2
  156. data/lib/fastly/api/tls_subscriptions_api.rb +0 -3
  157. data/lib/fastly/configuration.rb +19 -1
  158. data/lib/fastly/models/attack_report.rb +359 -0
  159. data/lib/fastly/models/attack_signal.rb +252 -0
  160. data/lib/fastly/models/attack_source.rb +267 -0
  161. data/lib/fastly/models/backend.rb +9 -4
  162. data/lib/fastly/models/backend_response.rb +9 -4
  163. data/lib/fastly/models/ddos_protection_attribute_stats.rb +2 -1
  164. data/lib/fastly/models/ddos_protection_invalid_request.rb +309 -0
  165. data/lib/fastly/models/{log_timeseries_filter_field_item.rb → ddos_protection_not_authorized.rb} +24 -36
  166. data/lib/fastly/models/ddos_protection_rule.rb +2 -1
  167. data/lib/fastly/models/ddos_protection_rule_all_of.rb +2 -1
  168. data/lib/fastly/models/{log_timeseries_get_response_meta_filters.rb → ddos_protection_rule_patch.rb} +13 -14
  169. data/lib/fastly/models/invitation.rb +1 -1
  170. data/lib/fastly/models/invitation_create_data.rb +244 -0
  171. data/lib/fastly/models/invitation_create_data_all_of.rb +216 -0
  172. data/lib/fastly/models/{invitation_response.rb → invitation_create_response.rb} +4 -4
  173. data/lib/fastly/models/{invitation_response_all_of.rb → invitation_create_response_all_of.rb} +3 -3
  174. data/lib/fastly/models/invitation_data.rb +4 -13
  175. data/lib/fastly/models/invitation_response_data.rb +13 -13
  176. data/lib/fastly/models/{log_timeseries_get_response.rb → list_attack_report.rb} +5 -5
  177. data/lib/fastly/models/list_attack_report_meta.rb +218 -0
  178. data/lib/fastly/models/{log_timeseries_result_dimensions.rb → list_signal_report.rb} +12 -10
  179. data/lib/fastly/models/logging_azureblob_response.rb +26 -2
  180. data/lib/fastly/models/logging_bigquery_additional.rb +1 -1
  181. data/lib/fastly/models/logging_bigquery_response.rb +26 -2
  182. data/lib/fastly/models/logging_cloudfiles_response.rb +26 -2
  183. data/lib/fastly/models/logging_common.rb +29 -5
  184. data/lib/fastly/models/logging_common_response.rb +26 -2
  185. data/lib/fastly/models/logging_common_response_all_of.rb +29 -5
  186. data/lib/fastly/models/logging_datadog_additional.rb +1 -1
  187. data/lib/fastly/models/logging_datadog_response.rb +26 -2
  188. data/lib/fastly/models/logging_digitalocean_response.rb +26 -2
  189. data/lib/fastly/models/logging_elasticsearch_additional.rb +1 -1
  190. data/lib/fastly/models/logging_elasticsearch_response.rb +26 -2
  191. data/lib/fastly/models/logging_ftp_response.rb +26 -2
  192. data/lib/fastly/models/logging_gcs_response.rb +26 -2
  193. data/lib/fastly/models/logging_google_pubsub_additional.rb +1 -1
  194. data/lib/fastly/models/logging_google_pubsub_response.rb +26 -2
  195. data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +1 -1
  196. data/lib/fastly/models/logging_grafanacloudlogs_response.rb +26 -2
  197. data/lib/fastly/models/logging_heroku_response.rb +26 -2
  198. data/lib/fastly/models/logging_honeycomb_additional.rb +1 -1
  199. data/lib/fastly/models/logging_honeycomb_response.rb +26 -2
  200. data/lib/fastly/models/logging_https_additional.rb +1 -1
  201. data/lib/fastly/models/logging_https_response.rb +26 -2
  202. data/lib/fastly/models/logging_kafka_response.rb +26 -2
  203. data/lib/fastly/models/logging_kafka_response_post.rb +26 -2
  204. data/lib/fastly/models/logging_kinesis_additional.rb +1 -1
  205. data/lib/fastly/models/logging_kinesis_response.rb +1 -1
  206. data/lib/fastly/models/logging_logentries_response.rb +26 -2
  207. data/lib/fastly/models/logging_loggly_response.rb +26 -2
  208. data/lib/fastly/models/logging_logshuttle_response.rb +26 -2
  209. data/lib/fastly/models/logging_newrelic_additional.rb +1 -1
  210. data/lib/fastly/models/logging_newrelic_response.rb +26 -2
  211. data/lib/fastly/models/logging_newrelicotlp_additional.rb +1 -1
  212. data/lib/fastly/models/logging_newrelicotlp_response.rb +26 -2
  213. data/lib/fastly/models/logging_openstack_response.rb +26 -2
  214. data/lib/fastly/models/logging_papertrail_response.rb +26 -2
  215. data/lib/fastly/models/logging_s3_response.rb +26 -2
  216. data/lib/fastly/models/logging_scalyr_response.rb +26 -2
  217. data/lib/fastly/models/logging_sftp_response.rb +26 -2
  218. data/lib/fastly/models/logging_splunk_response.rb +26 -2
  219. data/lib/fastly/models/logging_sumologic_response.rb +26 -2
  220. data/lib/fastly/models/logging_syslog_response.rb +26 -2
  221. data/lib/fastly/models/pool_additional.rb +1 -1
  222. data/lib/fastly/models/pool_response.rb +2 -2
  223. data/lib/fastly/models/pool_response_common.rb +1 -1
  224. data/lib/fastly/models/pool_response_post.rb +2 -2
  225. data/lib/fastly/models/relationship_service_invitations.rb +1 -0
  226. data/lib/fastly/models/relationship_service_invitations_service_invitations.rb +1 -0
  227. data/lib/fastly/models/relationships_for_invitation.rb +1 -0
  228. data/lib/fastly/models/signal_report.rb +249 -0
  229. data/lib/fastly/models/timeseries_get_response.rb +227 -0
  230. data/lib/fastly/models/{log_timeseries_get_response_meta.rb → timeseries_meta.rb} +23 -32
  231. data/lib/fastly/models/{log_timeseries_result.rb → timeseries_result.rb} +9 -5
  232. data/lib/fastly/models/tls_certificate_data_attributes.rb +14 -4
  233. data/lib/fastly/models/tls_csr_data.rb +4 -13
  234. data/lib/fastly/models/tls_csr_data_attributes.rb +14 -4
  235. data/lib/fastly/models/top_workspace.rb +238 -0
  236. data/lib/fastly/version.rb +1 -1
  237. data/lib/fastly.rb +20 -12
  238. data/sig.json +1 -1
  239. metadata +42 -26
  240. data/docs/LogTimeseriesFilterFieldItem.md +0 -12
  241. data/docs/LogTimeseriesGetResponse.md +0 -11
  242. data/docs/LogTimeseriesGetResponseMeta.md +0 -14
  243. data/docs/LogTimeseriesGetResponseMetaFilters.md +0 -10
  244. data/docs/LogTimeseriesResult.md +0 -11
  245. data/docs/LogTimeseriesResultDimensions.md +0 -10
  246. data/docs/LogTimeseriesValueField.md +0 -59
  247. data/docs/ObservabilityTimeseriesForLogsApi.md +0 -67
  248. data/lib/fastly/models/ddos_protection_action.rb +0 -37
  249. data/lib/fastly/models/ddos_protection_traffic_attribute.rb +0 -40
  250. data/lib/fastly/models/log_timeseries_value_field.rb +0 -108
@@ -22,9 +22,12 @@ module Fastly
22
22
  # The name of an existing condition in the configured endpoint, or leave blank to always execute.
23
23
  attr_accessor :response_condition
24
24
 
25
- # A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
25
+ # A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
26
26
  attr_accessor :format
27
27
 
28
+ # The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
29
+ attr_accessor :log_processing_region
30
+
28
31
  # The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
29
32
  attr_accessor :format_version
30
33
 
@@ -109,6 +112,7 @@ module Fastly
109
112
  :'placement' => :'placement',
110
113
  :'response_condition' => :'response_condition',
111
114
  :'format' => :'format',
115
+ :'log_processing_region' => :'log_processing_region',
112
116
  :'format_version' => :'format_version',
113
117
  :'message_type' => :'message_type',
114
118
  :'timestamp_format' => :'timestamp_format',
@@ -143,6 +147,7 @@ module Fastly
143
147
  :'placement' => :'String',
144
148
  :'response_condition' => :'String',
145
149
  :'format' => :'String',
150
+ :'log_processing_region' => :'String',
146
151
  :'format_version' => :'String',
147
152
  :'message_type' => :'String',
148
153
  :'timestamp_format' => :'String',
@@ -225,6 +230,12 @@ module Fastly
225
230
  self.format = '%h %l %u %t \"%r\" %>s %b'
226
231
  end
227
232
 
233
+ if attributes.key?(:'log_processing_region')
234
+ self.log_processing_region = attributes[:'log_processing_region']
235
+ else
236
+ self.log_processing_region = 'none'
237
+ end
238
+
228
239
  if attributes.key?(:'format_version')
229
240
  self.format_version = attributes[:'format_version']
230
241
  else
@@ -330,6 +341,8 @@ module Fastly
330
341
  def valid?
331
342
  placement_validator = EnumAttributeValidator.new('String', ["none", "null"])
332
343
  return false unless placement_validator.valid?(@placement)
344
+ log_processing_region_validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
345
+ return false unless log_processing_region_validator.valid?(@log_processing_region)
333
346
  format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
334
347
  return false unless format_version_validator.valid?(@format_version)
335
348
  message_type_validator = EnumAttributeValidator.new('String', ["classic", "loggly", "logplex", "blank"])
@@ -349,6 +362,16 @@ module Fastly
349
362
  @placement = placement
350
363
  end
351
364
 
365
+ # Custom attribute writer method checking allowed values (enum).
366
+ # @param [Object] log_processing_region Object to be assigned
367
+ def log_processing_region=(log_processing_region)
368
+ validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
369
+ unless validator.valid?(log_processing_region)
370
+ fail ArgumentError, "invalid value for \"log_processing_region\", must be one of #{validator.allowable_values}."
371
+ end
372
+ @log_processing_region = log_processing_region
373
+ end
374
+
352
375
  # Custom attribute writer method checking allowed values (enum).
353
376
  # @param [Object] format_version Object to be assigned
354
377
  def format_version=(format_version)
@@ -388,6 +411,7 @@ module Fastly
388
411
  placement == o.placement &&
389
412
  response_condition == o.response_condition &&
390
413
  format == o.format &&
414
+ log_processing_region == o.log_processing_region &&
391
415
  format_version == o.format_version &&
392
416
  message_type == o.message_type &&
393
417
  timestamp_format == o.timestamp_format &&
@@ -418,7 +442,7 @@ module Fastly
418
442
  # Calculates hash code according to all attributes.
419
443
  # @return [Integer] Hash code
420
444
  def hash
421
- [name, placement, response_condition, format, format_version, message_type, timestamp_format, compression_codec, created_at, deleted_at, updated_at, service_id, version, password, path, public_key, secret_key, ssh_known_hosts, user, address, port, period, gzip_level].hash
445
+ [name, placement, response_condition, format, log_processing_region, format_version, message_type, timestamp_format, compression_codec, created_at, deleted_at, updated_at, service_id, version, password, path, public_key, secret_key, ssh_known_hosts, user, address, port, period, gzip_level].hash
422
446
  end
423
447
 
424
448
  # Builds the object from hash
@@ -22,9 +22,12 @@ module Fastly
22
22
  # The name of an existing condition in the configured endpoint, or leave blank to always execute.
23
23
  attr_accessor :response_condition
24
24
 
25
- # A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
25
+ # A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
26
26
  attr_accessor :format
27
27
 
28
+ # The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
29
+ attr_accessor :log_processing_region
30
+
28
31
  # The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
29
32
  attr_accessor :format_version
30
33
 
@@ -96,6 +99,7 @@ module Fastly
96
99
  :'placement' => :'placement',
97
100
  :'response_condition' => :'response_condition',
98
101
  :'format' => :'format',
102
+ :'log_processing_region' => :'log_processing_region',
99
103
  :'format_version' => :'format_version',
100
104
  :'tls_ca_cert' => :'tls_ca_cert',
101
105
  :'tls_client_cert' => :'tls_client_cert',
@@ -126,6 +130,7 @@ module Fastly
126
130
  :'placement' => :'String',
127
131
  :'response_condition' => :'String',
128
132
  :'format' => :'String',
133
+ :'log_processing_region' => :'String',
129
134
  :'format_version' => :'String',
130
135
  :'tls_ca_cert' => :'String',
131
136
  :'tls_client_cert' => :'String',
@@ -204,6 +209,12 @@ module Fastly
204
209
  self.format = '%h %l %u %t \"%r\" %>s %b'
205
210
  end
206
211
 
212
+ if attributes.key?(:'log_processing_region')
213
+ self.log_processing_region = attributes[:'log_processing_region']
214
+ else
215
+ self.log_processing_region = 'none'
216
+ end
217
+
207
218
  if attributes.key?(:'format_version')
208
219
  self.format_version = attributes[:'format_version']
209
220
  else
@@ -293,6 +304,8 @@ module Fastly
293
304
  def valid?
294
305
  placement_validator = EnumAttributeValidator.new('String', ["none", "null"])
295
306
  return false unless placement_validator.valid?(@placement)
307
+ log_processing_region_validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
308
+ return false unless log_processing_region_validator.valid?(@log_processing_region)
296
309
  format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
297
310
  return false unless format_version_validator.valid?(@format_version)
298
311
  true
@@ -308,6 +321,16 @@ module Fastly
308
321
  @placement = placement
309
322
  end
310
323
 
324
+ # Custom attribute writer method checking allowed values (enum).
325
+ # @param [Object] log_processing_region Object to be assigned
326
+ def log_processing_region=(log_processing_region)
327
+ validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
328
+ unless validator.valid?(log_processing_region)
329
+ fail ArgumentError, "invalid value for \"log_processing_region\", must be one of #{validator.allowable_values}."
330
+ end
331
+ @log_processing_region = log_processing_region
332
+ end
333
+
311
334
  # Custom attribute writer method checking allowed values (enum).
312
335
  # @param [Object] format_version Object to be assigned
313
336
  def format_version=(format_version)
@@ -327,6 +350,7 @@ module Fastly
327
350
  placement == o.placement &&
328
351
  response_condition == o.response_condition &&
329
352
  format == o.format &&
353
+ log_processing_region == o.log_processing_region &&
330
354
  format_version == o.format_version &&
331
355
  tls_ca_cert == o.tls_ca_cert &&
332
356
  tls_client_cert == o.tls_client_cert &&
@@ -353,7 +377,7 @@ module Fastly
353
377
  # Calculates hash code according to all attributes.
354
378
  # @return [Integer] Hash code
355
379
  def hash
356
- [name, placement, response_condition, format, format_version, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, request_max_entries, request_max_bytes, url, token, use_tls, created_at, deleted_at, updated_at, service_id, version].hash
380
+ [name, placement, response_condition, format, log_processing_region, format_version, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, request_max_entries, request_max_bytes, url, token, use_tls, created_at, deleted_at, updated_at, service_id, version].hash
357
381
  end
358
382
 
359
383
  # Builds the object from hash
@@ -22,9 +22,12 @@ module Fastly
22
22
  # The name of an existing condition in the configured endpoint, or leave blank to always execute.
23
23
  attr_accessor :response_condition
24
24
 
25
- # A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
25
+ # A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
26
26
  attr_accessor :format
27
27
 
28
+ # The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
29
+ attr_accessor :log_processing_region
30
+
28
31
  # The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
29
32
  attr_accessor :format_version
30
33
 
@@ -75,6 +78,7 @@ module Fastly
75
78
  :'placement' => :'placement',
76
79
  :'response_condition' => :'response_condition',
77
80
  :'format' => :'format',
81
+ :'log_processing_region' => :'log_processing_region',
78
82
  :'format_version' => :'format_version',
79
83
  :'message_type' => :'message_type',
80
84
  :'url' => :'url',
@@ -98,6 +102,7 @@ module Fastly
98
102
  :'placement' => :'String',
99
103
  :'response_condition' => :'String',
100
104
  :'format' => :'String',
105
+ :'log_processing_region' => :'String',
101
106
  :'format_version' => :'String',
102
107
  :'message_type' => :'LoggingMessageType',
103
108
  :'url' => :'String',
@@ -163,6 +168,12 @@ module Fastly
163
168
  self.format = '%h %l %u %t \"%r\" %>s %b'
164
169
  end
165
170
 
171
+ if attributes.key?(:'log_processing_region')
172
+ self.log_processing_region = attributes[:'log_processing_region']
173
+ else
174
+ self.log_processing_region = 'none'
175
+ end
176
+
166
177
  if attributes.key?(:'format_version')
167
178
  self.format_version = attributes[:'format_version']
168
179
  else
@@ -212,6 +223,8 @@ module Fastly
212
223
  def valid?
213
224
  placement_validator = EnumAttributeValidator.new('String', ["none", "null"])
214
225
  return false unless placement_validator.valid?(@placement)
226
+ log_processing_region_validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
227
+ return false unless log_processing_region_validator.valid?(@log_processing_region)
215
228
  format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
216
229
  return false unless format_version_validator.valid?(@format_version)
217
230
  true
@@ -227,6 +240,16 @@ module Fastly
227
240
  @placement = placement
228
241
  end
229
242
 
243
+ # Custom attribute writer method checking allowed values (enum).
244
+ # @param [Object] log_processing_region Object to be assigned
245
+ def log_processing_region=(log_processing_region)
246
+ validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
247
+ unless validator.valid?(log_processing_region)
248
+ fail ArgumentError, "invalid value for \"log_processing_region\", must be one of #{validator.allowable_values}."
249
+ end
250
+ @log_processing_region = log_processing_region
251
+ end
252
+
230
253
  # Custom attribute writer method checking allowed values (enum).
231
254
  # @param [Object] format_version Object to be assigned
232
255
  def format_version=(format_version)
@@ -246,6 +269,7 @@ module Fastly
246
269
  placement == o.placement &&
247
270
  response_condition == o.response_condition &&
248
271
  format == o.format &&
272
+ log_processing_region == o.log_processing_region &&
249
273
  format_version == o.format_version &&
250
274
  message_type == o.message_type &&
251
275
  url == o.url &&
@@ -265,7 +289,7 @@ module Fastly
265
289
  # Calculates hash code according to all attributes.
266
290
  # @return [Integer] Hash code
267
291
  def hash
268
- [name, placement, response_condition, format, format_version, message_type, url, created_at, deleted_at, updated_at, service_id, version].hash
292
+ [name, placement, response_condition, format, log_processing_region, format_version, message_type, url, created_at, deleted_at, updated_at, service_id, version].hash
269
293
  end
270
294
 
271
295
  # Builds the object from hash
@@ -22,9 +22,12 @@ module Fastly
22
22
  # The name of an existing condition in the configured endpoint, or leave blank to always execute.
23
23
  attr_accessor :response_condition
24
24
 
25
- # A Fastly [log format string](https://docs.fastly.com/en/guides/custom-log-formats).
25
+ # A Fastly [log format string](https://www.fastly.com/documentation/guides/integrations/streaming-logs/custom-log-formats/).
26
26
  attr_accessor :format
27
27
 
28
+ # The geographic region where the logs will be processed before streaming. Valid values are `us`, `eu`, and `none` for global.
29
+ attr_accessor :log_processing_region
30
+
28
31
  # The version of the custom logging format used for the configured endpoint. The logging call gets placed by default in `vcl_log` if `format_version` is set to `2` and in `vcl_deliver` if `format_version` is set to `1`.
29
32
  attr_accessor :format_version
30
33
 
@@ -101,6 +104,7 @@ module Fastly
101
104
  :'placement' => :'placement',
102
105
  :'response_condition' => :'response_condition',
103
106
  :'format' => :'format',
107
+ :'log_processing_region' => :'log_processing_region',
104
108
  :'format_version' => :'format_version',
105
109
  :'tls_ca_cert' => :'tls_ca_cert',
106
110
  :'tls_client_cert' => :'tls_client_cert',
@@ -133,6 +137,7 @@ module Fastly
133
137
  :'placement' => :'String',
134
138
  :'response_condition' => :'String',
135
139
  :'format' => :'String',
140
+ :'log_processing_region' => :'String',
136
141
  :'format_version' => :'String',
137
142
  :'tls_ca_cert' => :'String',
138
143
  :'tls_client_cert' => :'String',
@@ -215,6 +220,12 @@ module Fastly
215
220
  self.format = '%h %l %u %t \"%r\" %>s %b'
216
221
  end
217
222
 
223
+ if attributes.key?(:'log_processing_region')
224
+ self.log_processing_region = attributes[:'log_processing_region']
225
+ else
226
+ self.log_processing_region = 'none'
227
+ end
228
+
218
229
  if attributes.key?(:'format_version')
219
230
  self.format_version = attributes[:'format_version']
220
231
  else
@@ -314,6 +325,8 @@ module Fastly
314
325
  def valid?
315
326
  placement_validator = EnumAttributeValidator.new('String', ["none", "null"])
316
327
  return false unless placement_validator.valid?(@placement)
328
+ log_processing_region_validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
329
+ return false unless log_processing_region_validator.valid?(@log_processing_region)
317
330
  format_version_validator = EnumAttributeValidator.new('String', ["1", "2"])
318
331
  return false unless format_version_validator.valid?(@format_version)
319
332
  true
@@ -329,6 +342,16 @@ module Fastly
329
342
  @placement = placement
330
343
  end
331
344
 
345
+ # Custom attribute writer method checking allowed values (enum).
346
+ # @param [Object] log_processing_region Object to be assigned
347
+ def log_processing_region=(log_processing_region)
348
+ validator = EnumAttributeValidator.new('String', ["none", "eu", "us"])
349
+ unless validator.valid?(log_processing_region)
350
+ fail ArgumentError, "invalid value for \"log_processing_region\", must be one of #{validator.allowable_values}."
351
+ end
352
+ @log_processing_region = log_processing_region
353
+ end
354
+
332
355
  # Custom attribute writer method checking allowed values (enum).
333
356
  # @param [Object] format_version Object to be assigned
334
357
  def format_version=(format_version)
@@ -348,6 +371,7 @@ module Fastly
348
371
  placement == o.placement &&
349
372
  response_condition == o.response_condition &&
350
373
  format == o.format &&
374
+ log_processing_region == o.log_processing_region &&
351
375
  format_version == o.format_version &&
352
376
  tls_ca_cert == o.tls_ca_cert &&
353
377
  tls_client_cert == o.tls_client_cert &&
@@ -376,7 +400,7 @@ module Fastly
376
400
  # Calculates hash code according to all attributes.
377
401
  # @return [Integer] Hash code
378
402
  def hash
379
- [name, placement, response_condition, format, format_version, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, address, port, message_type, hostname, ipv4, token, use_tls, created_at, deleted_at, updated_at, service_id, version].hash
403
+ [name, placement, response_condition, format, log_processing_region, format_version, tls_ca_cert, tls_client_cert, tls_client_key, tls_hostname, address, port, message_type, hostname, ipv4, token, use_tls, created_at, deleted_at, updated_at, service_id, version].hash
380
404
  end
381
405
 
382
406
  # Builds the object from hash
@@ -43,7 +43,7 @@ module Fastly
43
43
  # What type of load balance group to use.
44
44
  attr_accessor :type
45
45
 
46
- # The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
46
+ # The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
47
47
  attr_accessor :override_host
48
48
 
49
49
  class EnumAttributeValidator
@@ -71,10 +71,10 @@ module Fastly
71
71
  # What type of load balance group to use.
72
72
  attr_accessor :type
73
73
 
74
- # The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
74
+ # The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
75
75
  attr_accessor :override_host
76
76
 
77
- # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
77
+ # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`.
78
78
  attr_accessor :between_bytes_timeout
79
79
 
80
80
  # How long to wait for a timeout in milliseconds.
@@ -13,7 +13,7 @@ require 'time'
13
13
 
14
14
  module Fastly
15
15
  class PoolResponseCommon
16
- # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
16
+ # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`.
17
17
  attr_accessor :between_bytes_timeout
18
18
 
19
19
  # How long to wait for a timeout in milliseconds.
@@ -71,10 +71,10 @@ module Fastly
71
71
  # What type of load balance group to use.
72
72
  attr_accessor :type
73
73
 
74
- # The hostname to [override the Host header](https://docs.fastly.com/en/guides/specifying-an-override-host). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
74
+ # The hostname to [override the Host header](https://www.fastly.com/documentation/guides/full-site-delivery/domains-and-origins/specifying-an-override-host/). Defaults to `null` meaning no override of the Host header will occur. This setting can also be added to a Server definition. If the field is set on a Server definition it will override the Pool setting.
75
75
  attr_accessor :override_host
76
76
 
77
- # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, the response received so far will be considered complete and the fetch will end. May be set at runtime using `bereq.between_bytes_timeout`.
77
+ # Maximum duration in milliseconds that Fastly will wait while receiving no data on a download from a backend. If exceeded, for Delivery services, the response received so far will be considered complete and the fetch will end. For Compute services, timeout expiration is treated as a failure of the backend connection, and an error is generated. May be set at runtime using `bereq.between_bytes_timeout`.
78
78
  attr_accessor :between_bytes_timeout
79
79
 
80
80
  # How long to wait for a timeout in milliseconds.
@@ -37,6 +37,7 @@ module Fastly
37
37
  # List of attributes with nullable: true
38
38
  def self.fastly_nullable
39
39
  Set.new([
40
+ :'service_invitations'
40
41
  ])
41
42
  end
42
43
 
@@ -37,6 +37,7 @@ module Fastly
37
37
  # List of attributes with nullable: true
38
38
  def self.fastly_nullable
39
39
  Set.new([
40
+ :'data'
40
41
  ])
41
42
  end
42
43
 
@@ -41,6 +41,7 @@ module Fastly
41
41
  # List of attributes with nullable: true
42
42
  def self.fastly_nullable
43
43
  Set.new([
44
+ :'service_invitations'
44
45
  ])
45
46
  end
46
47
 
@@ -0,0 +1,249 @@
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 SignalReport
16
+ # Name of the attack type.
17
+ attr_accessor :name
18
+
19
+ # Display name of the attack type.
20
+ attr_accessor :display_name
21
+
22
+ # Total count of attacks of this type.
23
+ attr_accessor :count
24
+
25
+ # Top workspaces affected by this attack type.
26
+ attr_accessor :top_workspaces
27
+
28
+ # Attribute mapping from ruby-style variable name to JSON key.
29
+ def self.attribute_map
30
+ {
31
+ :'name' => :'name',
32
+ :'display_name' => :'display_name',
33
+ :'count' => :'count',
34
+ :'top_workspaces' => :'top_workspaces'
35
+ }
36
+ end
37
+
38
+ # Returns all the JSON keys this model knows about
39
+ def self.acceptable_attributes
40
+ attribute_map.values
41
+ end
42
+
43
+ # Attribute type mapping.
44
+ def self.fastly_types
45
+ {
46
+ :'name' => :'String',
47
+ :'display_name' => :'String',
48
+ :'count' => :'Integer',
49
+ :'top_workspaces' => :'Array<TopWorkspace>'
50
+ }
51
+ end
52
+
53
+ # List of attributes with nullable: true
54
+ def self.fastly_nullable
55
+ Set.new([
56
+ ])
57
+ end
58
+
59
+ # Initializes the object
60
+ # @param [Hash] attributes Model attributes in the form of hash
61
+ def initialize(attributes = {})
62
+ if (!attributes.is_a?(Hash))
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SignalReport` initialize method"
64
+ end
65
+
66
+ # check to see if the attribute exists and convert string to symbol for hash key
67
+ attributes = attributes.each_with_object({}) { |(k, v), h|
68
+ if (!self.class.attribute_map.key?(k.to_sym))
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SignalReport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
70
+ end
71
+ h[k.to_sym] = v
72
+ }
73
+
74
+ if attributes.key?(:'name')
75
+ self.name = attributes[:'name']
76
+ end
77
+
78
+ if attributes.key?(:'display_name')
79
+ self.display_name = attributes[:'display_name']
80
+ end
81
+
82
+ if attributes.key?(:'count')
83
+ self.count = attributes[:'count']
84
+ end
85
+
86
+ if attributes.key?(:'top_workspaces')
87
+ if (value = attributes[:'top_workspaces']).is_a?(Array)
88
+ self.top_workspaces = value
89
+ end
90
+ end
91
+ end
92
+
93
+ # Show invalid properties with the reasons. Usually used together with valid?
94
+ # @return Array for valid properties with the reasons
95
+ def list_invalid_properties
96
+ invalid_properties = Array.new
97
+ invalid_properties
98
+ end
99
+
100
+ # Check to see if the all the properties in the model are valid
101
+ # @return true if the model is valid
102
+ def valid?
103
+ true
104
+ end
105
+
106
+ # Checks equality by comparing each attribute.
107
+ # @param [Object] Object to be compared
108
+ def ==(o)
109
+ return true if self.equal?(o)
110
+ self.class == o.class &&
111
+ name == o.name &&
112
+ display_name == o.display_name &&
113
+ count == o.count &&
114
+ top_workspaces == o.top_workspaces
115
+ end
116
+
117
+ # @see the `==` method
118
+ # @param [Object] Object to be compared
119
+ def eql?(o)
120
+ self == o
121
+ end
122
+
123
+ # Calculates hash code according to all attributes.
124
+ # @return [Integer] Hash code
125
+ def hash
126
+ [name, display_name, count, top_workspaces].hash
127
+ end
128
+
129
+ # Builds the object from hash
130
+ # @param [Hash] attributes Model attributes in the form of hash
131
+ # @return [Object] Returns the model itself
132
+ def self.build_from_hash(attributes)
133
+ new.build_from_hash(attributes)
134
+ end
135
+
136
+ # Builds the object from hash
137
+ # @param [Hash] attributes Model attributes in the form of hash
138
+ # @return [Object] Returns the model itself
139
+ def build_from_hash(attributes)
140
+ return nil unless attributes.is_a?(Hash)
141
+ self.class.fastly_types.each_pair do |key, type|
142
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
143
+ self.send("#{key}=", nil)
144
+ elsif type =~ /\AArray<(.*)>/i
145
+ # check to ensure the input is an array given that the attribute
146
+ # is documented as an array but the input is not
147
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
148
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
149
+ end
150
+ elsif !attributes[self.class.attribute_map[key]].nil?
151
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
152
+ end
153
+ end
154
+
155
+ self
156
+ end
157
+
158
+ # Deserializes the data based on type
159
+ # @param string type Data type
160
+ # @param string value Value to be deserialized
161
+ # @return [Object] Deserialized data
162
+ def _deserialize(type, value)
163
+ case type.to_sym
164
+ when :Time
165
+ Time.parse(value)
166
+ when :Date
167
+ Date.parse(value)
168
+ when :String
169
+ value.to_s
170
+ when :Integer
171
+ value.to_i
172
+ when :Float
173
+ value.to_f
174
+ when :Boolean
175
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
176
+ true
177
+ else
178
+ false
179
+ end
180
+ when :Object
181
+ # generic object (usually a Hash), return directly
182
+ value
183
+ when /\AArray<(?<inner_type>.+)>\z/
184
+ inner_type = Regexp.last_match[:inner_type]
185
+ value.map { |v| _deserialize(inner_type, v) }
186
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
187
+ k_type = Regexp.last_match[:k_type]
188
+ v_type = Regexp.last_match[:v_type]
189
+ {}.tap do |hash|
190
+ value.each do |k, v|
191
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
192
+ end
193
+ end
194
+ else # model
195
+ # models (e.g. Pet) or oneOf
196
+ klass = Fastly.const_get(type)
197
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
198
+ end
199
+ end
200
+
201
+ # Returns the string representation of the object
202
+ # @return [String] String presentation of the object
203
+ def to_s
204
+ to_hash.to_s
205
+ end
206
+
207
+ # to_body is an alias to to_hash (backward compatibility)
208
+ # @return [Hash] Returns the object in the form of hash
209
+ def to_body
210
+ to_hash
211
+ end
212
+
213
+ # Returns the object in the form of hash
214
+ # @return [Hash] Returns the object in the form of hash
215
+ def to_hash
216
+ hash = {}
217
+ self.class.attribute_map.each_pair do |attr, param|
218
+ value = self.send(attr)
219
+ if value.nil?
220
+ is_nullable = self.class.fastly_nullable.include?(attr)
221
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
222
+ end
223
+
224
+ hash[param] = _to_hash(value)
225
+ end
226
+ hash
227
+ end
228
+
229
+ # Outputs non-array value in the form of hash
230
+ # For object, use to_hash. Otherwise, just return the value
231
+ # @param [Object] value Any valid value
232
+ # @return [Hash] Returns the value in the form of hash
233
+ def _to_hash(value)
234
+ if value.is_a?(Array)
235
+ value.compact.map { |v| _to_hash(v) }
236
+ elsif value.is_a?(Hash)
237
+ {}.tap do |hash|
238
+ value.each { |k, v| hash[k] = _to_hash(v) }
239
+ end
240
+ elsif value.respond_to? :to_hash
241
+ value.to_hash
242
+ else
243
+ value
244
+ end
245
+ end
246
+
247
+ end
248
+
249
+ end