fastly 16.1.0 → 17.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +58 -0
- data/Gemfile.lock +1 -1
- data/README.md +101 -58
- data/docs/Action.md +11 -0
- data/docs/ActionType.md +9 -0
- data/docs/AgentKey.md +14 -0
- data/docs/AgentKeyMeta.md +10 -0
- data/docs/Backend.md +3 -1
- data/docs/BackendApi.md +12 -4
- data/docs/BackendResponse.md +3 -1
- data/docs/BotManagementRequestUpdateConfiguration.md +10 -0
- data/docs/BotManagementResponseConfiguration.md +10 -0
- data/docs/BotManagementResponseConfigurationConfiguration.md +10 -0
- data/docs/BotManagementResponseConfigure.md +13 -0
- data/docs/ClientSideProtectionApi.md +821 -0
- data/docs/ConditionOperator.md +9 -0
- data/docs/ConditionType.md +9 -0
- data/docs/DdosProtectionApi.md +4 -4
- data/docs/Directive.md +11 -0
- data/docs/DmDomainsApi.md +2 -2
- data/docs/DmRoutingConfigsApi.md +912 -0
- data/docs/DomainOwnershipsApi.md +2 -2
- data/docs/DomainResearchApi.md +2 -2
- data/docs/DraftDiff.md +12 -0
- data/docs/DraftUpdate.md +10 -0
- data/docs/EventsResponse.md +1 -1
- data/docs/HeaderEvent.md +14 -0
- data/docs/InitialVersion.md +12 -0
- data/docs/InitialVersionPath.md +11 -0
- data/docs/InlineResponse20010.md +2 -2
- data/docs/InlineResponse20011.md +2 -2
- data/docs/InlineResponse20012.md +1 -1
- data/docs/InlineResponse20013.md +2 -2
- data/docs/InlineResponse20014.md +2 -1
- data/docs/InlineResponse20015.md +10 -0
- data/docs/InlineResponse20016.md +10 -0
- data/docs/InlineResponse20017.md +11 -0
- data/docs/InlineResponse20018.md +11 -0
- data/docs/InlineResponse20019.md +11 -0
- data/docs/InlineResponse20020.md +11 -0
- data/docs/InlineResponse20021.md +11 -0
- data/docs/InlineResponse20022.md +10 -0
- data/docs/InlineResponse2005.md +2 -2
- data/docs/InlineResponse2006.md +2 -2
- data/docs/InlineResponse2007.md +2 -2
- data/docs/InlineResponse2008.md +2 -1
- data/docs/InlineResponse2009.md +2 -1
- data/docs/InvitationsResponse.md +1 -1
- data/docs/KvStoreApi.md +2 -2
- data/docs/KvStoreItemApi.md +2 -2
- data/docs/KvStoreResponseBodyEnable.md +12 -0
- data/docs/KvStoreResponseCustomer.md +10 -0
- data/docs/KvStoreResponseLinks.md +10 -0
- data/docs/KvStoreResponseLinksLinks.md +10 -0
- data/docs/KvStoreResponseProduct.md +10 -0
- data/docs/KvStoreResponseProductProduct.md +11 -0
- data/docs/LoggingAzureblobApi.md +4 -4
- data/docs/LoggingAzureblobResponse.md +1 -1
- data/docs/LoggingCloudfilesApi.md +4 -4
- data/docs/LoggingCloudfilesResponse.md +1 -1
- data/docs/LoggingDigitaloceanApi.md +4 -4
- data/docs/LoggingDigitaloceanResponse.md +1 -1
- data/docs/LoggingFtpApi.md +4 -4
- data/docs/LoggingFtpResponse.md +1 -1
- data/docs/LoggingGcsApi.md +4 -4
- data/docs/LoggingGcsResponse.md +1 -1
- data/docs/LoggingGenericCommon.md +1 -1
- data/docs/LoggingGenericCommonResponse.md +1 -1
- data/docs/LoggingGenericCommonResponseAllOf.md +1 -1
- data/docs/LoggingHttpsAdditional.md +1 -1
- data/docs/LoggingHttpsApi.md +4 -4
- data/docs/LoggingHttpsResponse.md +1 -1
- data/docs/LoggingOpenstackApi.md +4 -4
- data/docs/LoggingOpenstackResponse.md +1 -1
- data/docs/LoggingS3Api.md +4 -4
- data/docs/LoggingS3Response.md +1 -1
- data/docs/LoggingSftpApi.md +4 -4
- data/docs/LoggingSftpResponse.md +1 -1
- data/docs/LoggingSumologicAdditional.md +1 -1
- data/docs/LoggingSumologicApi.md +4 -4
- data/docs/LoggingSumologicResponse.md +1 -1
- data/docs/LoggingSyslogAdditional.md +1 -1
- data/docs/LoggingSyslogApi.md +4 -4
- data/docs/LoggingSyslogResponse.md +1 -1
- data/docs/MutualAuthenticationsResponse.md +1 -1
- data/docs/NgwafAgentKeysApi.md +55 -0
- data/docs/NgwafSimulateApi.md +61 -0
- data/docs/Notification.md +11 -0
- data/docs/NotificationConfig.md +10 -0
- data/docs/Page.md +17 -0
- data/docs/PageCreate.md +14 -0
- data/docs/PageUpdate.md +14 -0
- data/docs/Pagination.md +1 -1
- data/docs/PaginationMeta.md +4 -4
- data/docs/PaginationMeta1.md +13 -0
- data/docs/PathChange.md +15 -0
- data/docs/PathCreate.md +10 -0
- data/docs/PathResponse.md +14 -0
- data/docs/PathResponseAllOf.md +12 -0
- data/docs/PathUpdate.md +10 -0
- data/docs/PathWithRules.md +11 -0
- data/docs/PathsResponse.md +11 -0
- data/docs/Policy.md +17 -0
- data/docs/PolicyCreate.md +13 -0
- data/docs/PolicyUpdate.md +13 -0
- data/docs/Position.md +11 -0
- data/docs/ProductBotManagementApi.md +78 -0
- data/docs/ProductKvStoreApi.md +115 -0
- data/docs/RealtimeEntry.md +1 -1
- data/docs/RealtimeEntryAggregated.md +34 -3
- data/docs/RealtimeEntryDatacenter.md +345 -0
- data/docs/RealtimeMeasurements.md +34 -3
- data/docs/Report.md +15 -0
- data/docs/RequestBodyForCreate.md +1 -0
- data/docs/RequestBodyForUpdate.md +1 -0
- data/docs/Results.md +34 -3
- data/docs/RoutingConfig.md +11 -0
- data/docs/RoutingConfigCondition.md +13 -0
- data/docs/RoutingConfigResponse.md +16 -0
- data/docs/RoutingConfigResponseAllOf.md +14 -0
- data/docs/RoutingConfigState.md +9 -0
- data/docs/RoutingConfigVersionResponse.md +13 -0
- data/docs/RoutingConfigsResponse.md +11 -0
- data/docs/RuleChange.md +12 -0
- data/docs/RuleCreate.md +12 -0
- data/docs/RuleResponse.md +15 -0
- data/docs/RuleResponseAllOf.md +13 -0
- data/docs/RuleUpdate.md +12 -0
- data/docs/RulesResponse.md +11 -0
- data/docs/Script.md +20 -0
- data/docs/ScriptUpdate.md +12 -0
- data/docs/SecretStoreApi.md +2 -2
- data/docs/SecretStoreItemApi.md +2 -2
- data/docs/SecurityHeader.md +12 -0
- data/docs/ServiceAuthorizationsApi.md +2 -2
- data/docs/ServiceAuthorizationsResponse.md +1 -1
- data/docs/SuccessfulResponseAsObject.md +1 -0
- data/docs/SuccessfulResponseAsObjectAllOf.md +1 -0
- data/docs/TlsActivationsResponse.md +1 -1
- data/docs/TlsBulkCertificatesResponse.md +1 -1
- data/docs/TlsCertificatesResponse.md +1 -1
- data/docs/TlsConfigurationsResponse.md +1 -1
- data/docs/TlsDomainsResponse.md +1 -1
- data/docs/TlsPrivateKeysResponse.md +1 -1
- data/docs/TlsSubscriptionsResponse.md +1 -1
- data/docs/VersionsResponse.md +11 -0
- data/docs/WafSimulateRequest.md +11 -0
- data/docs/WafSimulateResponse.md +11 -0
- data/docs/WafSimulateSignal.md +16 -0
- data/docs/Website.md +14 -0
- data/docs/WebsiteCreate.md +10 -0
- data/docs/WebsiteUpdate.md +10 -0
- data/lib/fastly/api/backend_api.rb +16 -4
- data/lib/fastly/api/client_side_protection_api.rb +1465 -0
- data/lib/fastly/api/ddos_protection_api.rb +6 -6
- data/lib/fastly/api/dm_domains_api.rb +3 -3
- data/lib/fastly/api/dm_routing_configs_api.rb +1596 -0
- data/lib/fastly/api/domain_ownerships_api.rb +3 -3
- data/lib/fastly/api/domain_research_api.rb +3 -3
- data/lib/fastly/api/kv_store_api.rb +3 -3
- data/lib/fastly/api/kv_store_item_api.rb +3 -3
- data/lib/fastly/api/logging_azureblob_api.rb +6 -6
- data/lib/fastly/api/logging_cloudfiles_api.rb +6 -6
- data/lib/fastly/api/logging_digitalocean_api.rb +6 -6
- data/lib/fastly/api/logging_ftp_api.rb +6 -6
- data/lib/fastly/api/logging_gcs_api.rb +6 -6
- data/lib/fastly/api/logging_https_api.rb +4 -4
- data/lib/fastly/api/logging_openstack_api.rb +6 -6
- data/lib/fastly/api/logging_s3_api.rb +6 -6
- data/lib/fastly/api/logging_sftp_api.rb +6 -6
- data/lib/fastly/api/logging_sumologic_api.rb +4 -4
- data/lib/fastly/api/logging_syslog_api.rb +4 -4
- data/lib/fastly/api/ngwaf_agent_keys_api.rb +83 -0
- data/lib/fastly/api/ngwaf_simulate_api.rb +95 -0
- data/lib/fastly/api/product_bot_management_api.rb +133 -0
- data/lib/fastly/api/product_kv_store_api.rb +186 -0
- data/lib/fastly/api/secret_store_api.rb +3 -3
- data/lib/fastly/api/secret_store_item_api.rb +3 -3
- data/lib/fastly/api/service_authorizations_api.rb +3 -3
- data/lib/fastly/configuration.rb +294 -0
- data/lib/fastly/models/action.rb +237 -0
- data/lib/fastly/models/action_type.rb +34 -0
- data/lib/fastly/models/agent_key.rb +283 -0
- data/lib/fastly/models/agent_key_meta.rb +223 -0
- data/lib/fastly/models/backend.rb +24 -2
- data/lib/fastly/models/backend_response.rb +24 -2
- data/lib/fastly/models/bot_management_request_update_configuration.rb +256 -0
- data/lib/fastly/models/bot_management_response_configuration.rb +216 -0
- data/lib/fastly/models/bot_management_response_configuration_configuration.rb +217 -0
- data/lib/fastly/models/bot_management_response_configure.rb +253 -0
- data/lib/fastly/models/condition_operator.rb +37 -0
- data/lib/fastly/models/condition_type.rb +34 -0
- data/lib/fastly/models/directive.rb +229 -0
- data/lib/fastly/models/draft_diff.rb +244 -0
- data/lib/fastly/models/draft_update.rb +218 -0
- data/lib/fastly/models/events_response.rb +1 -1
- data/lib/fastly/models/header_event.rb +252 -0
- data/lib/fastly/models/initial_version.rb +242 -0
- data/lib/fastly/models/initial_version_path.rb +254 -0
- data/lib/fastly/models/inline_response20010.rb +2 -2
- data/lib/fastly/models/inline_response20011.rb +2 -2
- data/lib/fastly/models/inline_response20012.rb +1 -1
- data/lib/fastly/models/inline_response20013.rb +11 -1
- data/lib/fastly/models/inline_response20014.rb +15 -4
- data/lib/fastly/models/inline_response20015.rb +217 -0
- data/lib/fastly/models/inline_response20016.rb +218 -0
- data/lib/fastly/models/inline_response20017.rb +227 -0
- data/lib/fastly/models/inline_response20018.rb +227 -0
- data/lib/fastly/models/inline_response20019.rb +228 -0
- data/lib/fastly/models/inline_response20020.rb +227 -0
- data/lib/fastly/models/inline_response20021.rb +227 -0
- data/lib/fastly/models/inline_response20022.rb +218 -0
- data/lib/fastly/models/inline_response2005.rb +2 -2
- data/lib/fastly/models/inline_response2006.rb +2 -12
- data/lib/fastly/models/inline_response2007.rb +2 -4
- data/lib/fastly/models/inline_response2008.rb +18 -8
- data/lib/fastly/models/inline_response2009.rb +17 -8
- data/lib/fastly/models/invitations_response.rb +1 -1
- data/lib/fastly/models/kv_store_response_body_enable.rb +243 -0
- data/lib/fastly/models/kv_store_response_customer.rb +216 -0
- data/lib/fastly/models/kv_store_response_links.rb +216 -0
- data/lib/fastly/models/kv_store_response_links_links.rb +217 -0
- data/lib/fastly/models/kv_store_response_product.rb +216 -0
- data/lib/fastly/models/kv_store_response_product_product.rb +227 -0
- data/lib/fastly/models/logging_azureblob_response.rb +3 -3
- data/lib/fastly/models/logging_cloudfiles_response.rb +3 -3
- data/lib/fastly/models/logging_digitalocean_response.rb +3 -3
- data/lib/fastly/models/logging_ftp_response.rb +3 -3
- data/lib/fastly/models/logging_gcs_response.rb +3 -3
- data/lib/fastly/models/logging_generic_common.rb +3 -3
- data/lib/fastly/models/logging_generic_common_response.rb +3 -3
- data/lib/fastly/models/logging_generic_common_response_all_of.rb +3 -3
- data/lib/fastly/models/logging_https_additional.rb +1 -1
- data/lib/fastly/models/logging_https_response.rb +1 -1
- data/lib/fastly/models/logging_message_type.rb +1 -1
- data/lib/fastly/models/logging_openstack_response.rb +3 -3
- data/lib/fastly/models/logging_s3_response.rb +3 -3
- data/lib/fastly/models/logging_sftp_response.rb +3 -3
- data/lib/fastly/models/logging_sumologic_additional.rb +1 -1
- data/lib/fastly/models/logging_sumologic_response.rb +1 -1
- data/lib/fastly/models/logging_syslog_additional.rb +1 -1
- data/lib/fastly/models/logging_syslog_response.rb +1 -1
- data/lib/fastly/models/mutual_authentications_response.rb +1 -1
- data/lib/fastly/models/notification.rb +270 -0
- data/lib/fastly/models/notification_config.rb +218 -0
- data/lib/fastly/models/page.rb +289 -0
- data/lib/fastly/models/page_create.rb +266 -0
- data/lib/fastly/models/page_update.rb +256 -0
- data/lib/fastly/models/pagination.rb +1 -1
- data/lib/fastly/models/pagination_meta.rb +30 -55
- data/lib/fastly/models/pagination_meta1.rb +273 -0
- data/lib/fastly/models/path_change.rb +274 -0
- data/lib/fastly/models/path_create.rb +242 -0
- data/lib/fastly/models/path_response.rb +285 -0
- data/lib/fastly/models/path_response_all_of.rb +254 -0
- data/lib/fastly/models/path_update.rb +233 -0
- data/lib/fastly/models/path_with_rules.rb +228 -0
- data/lib/fastly/models/paths_response.rb +228 -0
- data/lib/fastly/models/policy.rb +315 -0
- data/lib/fastly/models/policy_create.rb +289 -0
- data/lib/fastly/models/policy_update.rb +279 -0
- data/lib/fastly/models/position.rb +228 -0
- data/lib/fastly/models/realtime_entry.rb +2 -5
- data/lib/fastly/models/realtime_entry_aggregated.rb +344 -34
- data/lib/fastly/models/realtime_entry_datacenter.rb +3577 -0
- data/lib/fastly/models/realtime_measurements.rb +344 -34
- data/lib/fastly/models/report.rb +261 -0
- data/lib/fastly/models/request_body_for_create.rb +12 -1
- data/lib/fastly/models/request_body_for_update.rb +12 -1
- data/lib/fastly/models/results.rb +341 -31
- data/lib/fastly/models/routing_config.rb +251 -0
- data/lib/fastly/models/routing_config_condition.rb +261 -0
- data/lib/fastly/models/routing_config_response.rb +305 -0
- data/lib/fastly/models/routing_config_response_all_of.rb +274 -0
- data/lib/fastly/models/routing_config_state.rb +36 -0
- data/lib/fastly/models/routing_config_version_response.rb +250 -0
- data/lib/fastly/models/routing_configs_response.rb +228 -0
- data/lib/fastly/models/rule_change.rb +236 -0
- data/lib/fastly/models/rule_create.rb +267 -0
- data/lib/fastly/models/rule_response.rb +279 -0
- data/lib/fastly/models/rule_response_all_of.rb +248 -0
- data/lib/fastly/models/rule_update.rb +252 -0
- data/lib/fastly/models/rules_response.rb +228 -0
- data/lib/fastly/models/script.rb +350 -0
- data/lib/fastly/models/script_update.rb +271 -0
- data/lib/fastly/models/security_header.rb +234 -0
- data/lib/fastly/models/service_authorizations_response.rb +1 -1
- data/lib/fastly/models/successful_response_as_object.rb +12 -1
- data/lib/fastly/models/successful_response_as_object_all_of.rb +12 -1
- data/lib/fastly/models/tls_activations_response.rb +1 -1
- data/lib/fastly/models/tls_bulk_certificates_response.rb +1 -1
- data/lib/fastly/models/tls_certificates_response.rb +1 -1
- data/lib/fastly/models/tls_configurations_response.rb +1 -1
- data/lib/fastly/models/tls_domains_response.rb +1 -1
- data/lib/fastly/models/tls_private_keys_response.rb +1 -1
- data/lib/fastly/models/tls_subscriptions_response.rb +1 -1
- data/lib/fastly/models/versions_response.rb +228 -0
- data/lib/fastly/models/waf_simulate_request.rb +233 -0
- data/lib/fastly/models/waf_simulate_response.rb +240 -0
- data/lib/fastly/models/waf_simulate_signal.rb +344 -0
- data/lib/fastly/models/website.rb +257 -0
- data/lib/fastly/models/website_create.rb +222 -0
- data/lib/fastly/models/website_update.rb +217 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +77 -0
- data/sig.json +1 -1
- metadata +156 -2
|
@@ -49,18 +49,24 @@ module Fastly
|
|
|
49
49
|
# IPv6 address of the backend. May be used as an alternative to `address` to set the backend location.
|
|
50
50
|
attr_accessor :ipv6
|
|
51
51
|
|
|
52
|
-
# How long in seconds to keep a persistent connection to the backend between requests. By default,
|
|
52
|
+
# How long (in seconds) to keep a persistent connection to the backend between requests. By default, Fastly keeps connections open as long as it can.
|
|
53
53
|
attr_accessor :keepalive_time
|
|
54
54
|
|
|
55
55
|
# Maximum number of concurrent connections this backend will accept.
|
|
56
56
|
attr_accessor :max_conn
|
|
57
57
|
|
|
58
|
+
# Maximum time from creation (in milliseconds) that a pooled HTTP keepalive connection will be eligible for reuse; 0 is treated as unlimited.
|
|
59
|
+
attr_accessor :max_lifetime
|
|
60
|
+
|
|
58
61
|
# Maximum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
|
|
59
62
|
attr_accessor :max_tls_version
|
|
60
63
|
|
|
61
64
|
# Minimum allowed TLS version on SSL connections to this backend. If your backend server is not able to negotiate a connection meeting this constraint, a synthetic `503` error response will be generated.
|
|
62
65
|
attr_accessor :min_tls_version
|
|
63
66
|
|
|
67
|
+
# Maximum number of requests allowed over a single, pooled HTTP keepalive connection to this backend; 0 is treated as unlimited.
|
|
68
|
+
attr_accessor :max_use
|
|
69
|
+
|
|
64
70
|
# The name of the backend.
|
|
65
71
|
attr_accessor :name
|
|
66
72
|
|
|
@@ -157,8 +163,10 @@ module Fastly
|
|
|
157
163
|
:'ipv6' => :'ipv6',
|
|
158
164
|
:'keepalive_time' => :'keepalive_time',
|
|
159
165
|
:'max_conn' => :'max_conn',
|
|
166
|
+
:'max_lifetime' => :'max_lifetime',
|
|
160
167
|
:'max_tls_version' => :'max_tls_version',
|
|
161
168
|
:'min_tls_version' => :'min_tls_version',
|
|
169
|
+
:'max_use' => :'max_use',
|
|
162
170
|
:'name' => :'name',
|
|
163
171
|
:'override_host' => :'override_host',
|
|
164
172
|
:'port' => :'port',
|
|
@@ -211,8 +219,10 @@ module Fastly
|
|
|
211
219
|
:'ipv6' => :'String',
|
|
212
220
|
:'keepalive_time' => :'Integer',
|
|
213
221
|
:'max_conn' => :'Integer',
|
|
222
|
+
:'max_lifetime' => :'Integer',
|
|
214
223
|
:'max_tls_version' => :'String',
|
|
215
224
|
:'min_tls_version' => :'String',
|
|
225
|
+
:'max_use' => :'Integer',
|
|
216
226
|
:'name' => :'String',
|
|
217
227
|
:'override_host' => :'String',
|
|
218
228
|
:'port' => :'Integer',
|
|
@@ -253,8 +263,10 @@ module Fastly
|
|
|
253
263
|
:'ipv4',
|
|
254
264
|
:'ipv6',
|
|
255
265
|
:'keepalive_time',
|
|
266
|
+
:'max_lifetime',
|
|
256
267
|
:'max_tls_version',
|
|
257
268
|
:'min_tls_version',
|
|
269
|
+
:'max_use',
|
|
258
270
|
:'override_host',
|
|
259
271
|
:'share_key',
|
|
260
272
|
:'shield',
|
|
@@ -357,6 +369,10 @@ module Fastly
|
|
|
357
369
|
self.max_conn = attributes[:'max_conn']
|
|
358
370
|
end
|
|
359
371
|
|
|
372
|
+
if attributes.key?(:'max_lifetime')
|
|
373
|
+
self.max_lifetime = attributes[:'max_lifetime']
|
|
374
|
+
end
|
|
375
|
+
|
|
360
376
|
if attributes.key?(:'max_tls_version')
|
|
361
377
|
self.max_tls_version = attributes[:'max_tls_version']
|
|
362
378
|
end
|
|
@@ -365,6 +381,10 @@ module Fastly
|
|
|
365
381
|
self.min_tls_version = attributes[:'min_tls_version']
|
|
366
382
|
end
|
|
367
383
|
|
|
384
|
+
if attributes.key?(:'max_use')
|
|
385
|
+
self.max_use = attributes[:'max_use']
|
|
386
|
+
end
|
|
387
|
+
|
|
368
388
|
if attributes.key?(:'name')
|
|
369
389
|
self.name = attributes[:'name']
|
|
370
390
|
end
|
|
@@ -531,8 +551,10 @@ module Fastly
|
|
|
531
551
|
ipv6 == o.ipv6 &&
|
|
532
552
|
keepalive_time == o.keepalive_time &&
|
|
533
553
|
max_conn == o.max_conn &&
|
|
554
|
+
max_lifetime == o.max_lifetime &&
|
|
534
555
|
max_tls_version == o.max_tls_version &&
|
|
535
556
|
min_tls_version == o.min_tls_version &&
|
|
557
|
+
max_use == o.max_use &&
|
|
536
558
|
name == o.name &&
|
|
537
559
|
override_host == o.override_host &&
|
|
538
560
|
port == o.port &&
|
|
@@ -571,7 +593,7 @@ module Fastly
|
|
|
571
593
|
# Calculates hash code according to all attributes.
|
|
572
594
|
# @return [Integer] Hash code
|
|
573
595
|
def hash
|
|
574
|
-
[address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, fetch_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_tls_version, min_tls_version, name, override_host, port, prefer_ipv6, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, tcp_keepalive_enable, tcp_keepalive_interval, tcp_keepalive_probes, tcp_keepalive_time, use_ssl, weight, created_at, deleted_at, updated_at, service_id, version, locked].hash
|
|
596
|
+
[address, auto_loadbalance, between_bytes_timeout, client_cert, comment, connect_timeout, first_byte_timeout, fetch_timeout, healthcheck, hostname, ipv4, ipv6, keepalive_time, max_conn, max_lifetime, max_tls_version, min_tls_version, max_use, name, override_host, port, prefer_ipv6, request_condition, share_key, shield, ssl_ca_cert, ssl_cert_hostname, ssl_check_cert, ssl_ciphers, ssl_client_cert, ssl_client_key, ssl_hostname, ssl_sni_hostname, tcp_keepalive_enable, tcp_keepalive_interval, tcp_keepalive_probes, tcp_keepalive_time, use_ssl, weight, created_at, deleted_at, updated_at, service_id, version, locked].hash
|
|
575
597
|
end
|
|
576
598
|
|
|
577
599
|
# Builds the object from hash
|
|
@@ -0,0 +1,256 @@
|
|
|
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 BotManagementRequestUpdateConfiguration
|
|
16
|
+
# ContentGuard status
|
|
17
|
+
attr_accessor :contentguard
|
|
18
|
+
|
|
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
|
|
35
|
+
|
|
36
|
+
def valid?(value)
|
|
37
|
+
!value || allowable_values.include?(value)
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
42
|
+
def self.attribute_map
|
|
43
|
+
{
|
|
44
|
+
:'contentguard' => :'contentguard'
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Returns all the JSON keys this model knows about
|
|
49
|
+
def self.acceptable_attributes
|
|
50
|
+
attribute_map.values
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
# Attribute type mapping.
|
|
54
|
+
def self.fastly_types
|
|
55
|
+
{
|
|
56
|
+
:'contentguard' => :'String'
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# List of attributes with nullable: true
|
|
61
|
+
def self.fastly_nullable
|
|
62
|
+
Set.new([
|
|
63
|
+
])
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# Initializes the object
|
|
67
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
68
|
+
def initialize(attributes = {})
|
|
69
|
+
if (!attributes.is_a?(Hash))
|
|
70
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::BotManagementRequestUpdateConfiguration` initialize method"
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
|
75
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
|
76
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BotManagementRequestUpdateConfiguration`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
|
77
|
+
end
|
|
78
|
+
h[k.to_sym] = v
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
if attributes.key?(:'contentguard')
|
|
82
|
+
self.contentguard = attributes[:'contentguard']
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
|
87
|
+
# @return Array for valid properties with the reasons
|
|
88
|
+
def list_invalid_properties
|
|
89
|
+
invalid_properties = Array.new
|
|
90
|
+
if @contentguard.nil?
|
|
91
|
+
invalid_properties.push('invalid value for "contentguard", contentguard cannot be nil.')
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
invalid_properties
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
# Check to see if the all the properties in the model are valid
|
|
98
|
+
# @return true if the model is valid
|
|
99
|
+
def valid?
|
|
100
|
+
return false if @contentguard.nil?
|
|
101
|
+
contentguard_validator = EnumAttributeValidator.new('String', ["false", "true"])
|
|
102
|
+
return false unless contentguard_validator.valid?(@contentguard)
|
|
103
|
+
true
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
107
|
+
# @param [Object] contentguard Object to be assigned
|
|
108
|
+
def contentguard=(contentguard)
|
|
109
|
+
validator = EnumAttributeValidator.new('String', ["false", "true"])
|
|
110
|
+
unless validator.valid?(contentguard)
|
|
111
|
+
fail ArgumentError, "invalid value for \"contentguard\", must be one of #{validator.allowable_values}."
|
|
112
|
+
end
|
|
113
|
+
@contentguard = contentguard
|
|
114
|
+
end
|
|
115
|
+
|
|
116
|
+
# Checks equality by comparing each attribute.
|
|
117
|
+
# @param [Object] Object to be compared
|
|
118
|
+
def ==(o)
|
|
119
|
+
return true if self.equal?(o)
|
|
120
|
+
self.class == o.class &&
|
|
121
|
+
contentguard == o.contentguard
|
|
122
|
+
end
|
|
123
|
+
|
|
124
|
+
# @see the `==` method
|
|
125
|
+
# @param [Object] Object to be compared
|
|
126
|
+
def eql?(o)
|
|
127
|
+
self == o
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
# Calculates hash code according to all attributes.
|
|
131
|
+
# @return [Integer] Hash code
|
|
132
|
+
def hash
|
|
133
|
+
[contentguard].hash
|
|
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 self.build_from_hash(attributes)
|
|
140
|
+
new.build_from_hash(attributes)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
# Builds the object from hash
|
|
144
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
145
|
+
# @return [Object] Returns the model itself
|
|
146
|
+
def build_from_hash(attributes)
|
|
147
|
+
return nil unless attributes.is_a?(Hash)
|
|
148
|
+
self.class.fastly_types.each_pair do |key, type|
|
|
149
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
|
150
|
+
self.send("#{key}=", nil)
|
|
151
|
+
elsif type =~ /\AArray<(.*)>/i
|
|
152
|
+
# check to ensure the input is an array given that the attribute
|
|
153
|
+
# is documented as an array but the input is not
|
|
154
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
155
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
|
156
|
+
end
|
|
157
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
158
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
|
159
|
+
end
|
|
160
|
+
end
|
|
161
|
+
|
|
162
|
+
self
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# Deserializes the data based on type
|
|
166
|
+
# @param string type Data type
|
|
167
|
+
# @param string value Value to be deserialized
|
|
168
|
+
# @return [Object] Deserialized data
|
|
169
|
+
def _deserialize(type, value)
|
|
170
|
+
case type.to_sym
|
|
171
|
+
when :Time
|
|
172
|
+
Time.parse(value)
|
|
173
|
+
when :Date
|
|
174
|
+
Date.parse(value)
|
|
175
|
+
when :String
|
|
176
|
+
value.to_s
|
|
177
|
+
when :Integer
|
|
178
|
+
value.to_i
|
|
179
|
+
when :Float
|
|
180
|
+
value.to_f
|
|
181
|
+
when :Boolean
|
|
182
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
|
183
|
+
true
|
|
184
|
+
else
|
|
185
|
+
false
|
|
186
|
+
end
|
|
187
|
+
when :Object
|
|
188
|
+
# generic object (usually a Hash), return directly
|
|
189
|
+
value
|
|
190
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
|
191
|
+
inner_type = Regexp.last_match[:inner_type]
|
|
192
|
+
value.map { |v| _deserialize(inner_type, v) }
|
|
193
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
|
194
|
+
k_type = Regexp.last_match[:k_type]
|
|
195
|
+
v_type = Regexp.last_match[:v_type]
|
|
196
|
+
{}.tap do |hash|
|
|
197
|
+
value.each do |k, v|
|
|
198
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
|
199
|
+
end
|
|
200
|
+
end
|
|
201
|
+
else # model
|
|
202
|
+
# models (e.g. Pet) or oneOf
|
|
203
|
+
klass = Fastly.const_get(type)
|
|
204
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
# Returns the string representation of the object
|
|
209
|
+
# @return [String] String presentation of the object
|
|
210
|
+
def to_s
|
|
211
|
+
to_hash.to_s
|
|
212
|
+
end
|
|
213
|
+
|
|
214
|
+
# to_body is an alias to to_hash (backward compatibility)
|
|
215
|
+
# @return [Hash] Returns the object in the form of hash
|
|
216
|
+
def to_body
|
|
217
|
+
to_hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
# Returns the object in the form of hash
|
|
221
|
+
# @return [Hash] Returns the object in the form of hash
|
|
222
|
+
def to_hash
|
|
223
|
+
hash = {}
|
|
224
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
225
|
+
value = self.send(attr)
|
|
226
|
+
if value.nil?
|
|
227
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
|
228
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
hash[param] = _to_hash(value)
|
|
232
|
+
end
|
|
233
|
+
hash
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
# Outputs non-array value in the form of hash
|
|
237
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
238
|
+
# @param [Object] value Any valid value
|
|
239
|
+
# @return [Hash] Returns the value in the form of hash
|
|
240
|
+
def _to_hash(value)
|
|
241
|
+
if value.is_a?(Array)
|
|
242
|
+
value.compact.map { |v| _to_hash(v) }
|
|
243
|
+
elsif value.is_a?(Hash)
|
|
244
|
+
{}.tap do |hash|
|
|
245
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
246
|
+
end
|
|
247
|
+
elsif value.respond_to? :to_hash
|
|
248
|
+
value.to_hash
|
|
249
|
+
else
|
|
250
|
+
value
|
|
251
|
+
end
|
|
252
|
+
end
|
|
253
|
+
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
end
|
|
@@ -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 BotManagementResponseConfiguration
|
|
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' => :'BotManagementResponseConfigurationConfiguration'
|
|
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::BotManagementResponseConfiguration` 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::BotManagementResponseConfiguration`. 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
|