fastly 9.0.0 → 11.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 +66 -19
- data/Gemfile.lock +3 -3
- data/README.md +50 -46
- data/docs/AclsInComputeApi.md +2 -2
- data/docs/AiAcceleratorResponseBodyEnable.md +12 -0
- data/docs/AiAcceleratorResponseCustomer.md +10 -0
- data/docs/AiAcceleratorResponseCustomerCustomer.md +11 -0
- data/docs/AiAcceleratorResponseLinks.md +10 -0
- data/docs/AiAcceleratorResponseLinksLinks.md +10 -0
- data/docs/AiAcceleratorResponseProduct.md +10 -0
- data/docs/AiAcceleratorResponseProductProduct.md +11 -0
- data/docs/AutomationToken.md +1 -1
- data/docs/AutomationTokenCreateRequestAttributes.md +1 -1
- data/docs/AutomationTokenCreateResponse.md +4 -6
- data/docs/AutomationTokenCreateResponseAllOf.md +3 -3
- data/docs/AutomationTokenResponse.md +4 -6
- data/docs/AutomationTokenResponseAllOf.md +4 -4
- data/docs/Backend.md +1 -1
- data/docs/BackendApi.md +4 -4
- data/docs/BackendResponse.md +1 -1
- data/docs/BillingUsageMetricsApi.md +15 -13
- data/docs/BotManagementResponseBodyEnable.md +12 -0
- data/docs/BotManagementResponseLinks.md +10 -0
- data/docs/BotManagementResponseLinksLinks.md +11 -0
- data/docs/BotManagementResponseProduct.md +10 -0
- data/docs/BotManagementResponseProductProduct.md +11 -0
- data/docs/BotManagementResponseService.md +10 -0
- data/docs/{EnabledProductResponseService.md → BotManagementResponseServiceService.md} +1 -1
- data/docs/BrotliCompressionResponseBodyEnable.md +12 -0
- data/docs/BrotliCompressionResponseLinks.md +10 -0
- data/docs/BrotliCompressionResponseLinksLinks.md +11 -0
- data/docs/BrotliCompressionResponseProduct.md +10 -0
- data/docs/BrotliCompressionResponseProductProduct.md +11 -0
- data/docs/BrotliCompressionResponseService.md +10 -0
- data/docs/ComputeAclList.md +11 -0
- data/docs/ComputeAclListEntriesMeta.md +1 -1
- data/docs/{LegacyWafTag.md → ComputeAclListMeta.md} +2 -2
- data/docs/ComputeAclLookup.md +1 -2
- data/docs/{BillingEstimateInvoiceId.md → DdosProtectionRequestUpdateConfiguration.md} +2 -2
- data/docs/DdosProtectionResponseConfiguration.md +10 -0
- data/docs/{ReadOnlyServiceId.md → DdosProtectionResponseConfigurationConfiguration.md} +2 -1
- data/docs/DdosProtectionResponseConfigure.md +13 -0
- data/docs/DdosProtectionResponseEnable.md +12 -0
- data/docs/{BillingResponseItemItemsData.md → DdosProtectionResponseLinks.md} +2 -2
- data/docs/DdosProtectionResponseLinksLinks.md +11 -0
- data/docs/DdosProtectionResponseProduct.md +10 -0
- data/docs/DdosProtectionResponseProductProduct.md +11 -0
- data/docs/DdosProtectionResponseService.md +10 -0
- data/docs/DomainInspectorMeasurements.md +2 -0
- data/docs/DomainInspectorResponseBodyEnable.md +12 -0
- data/docs/DomainInspectorResponseLinks.md +10 -0
- data/docs/DomainInspectorResponseLinksLinks.md +11 -0
- data/docs/DomainInspectorResponseProduct.md +10 -0
- data/docs/DomainInspectorResponseProductProduct.md +11 -0
- data/docs/DomainInspectorResponseService.md +10 -0
- data/docs/FanoutResponseBodyEnable.md +12 -0
- data/docs/FanoutResponseLinks.md +10 -0
- data/docs/{EnabledProductResponseLinks.md → FanoutResponseLinksLinks.md} +1 -1
- data/docs/FanoutResponseProduct.md +10 -0
- data/docs/{EnabledProductResponseProduct.md → FanoutResponseProductProduct.md} +1 -1
- data/docs/FanoutResponseService.md +10 -0
- data/docs/Header.md +2 -0
- data/docs/HeaderApi.md +8 -8
- data/docs/ImageOptimizerResponseBodyEnable.md +12 -0
- data/docs/ImageOptimizerResponseLinks.md +10 -0
- data/docs/ImageOptimizerResponseLinksLinks.md +11 -0
- data/docs/ImageOptimizerResponseProduct.md +10 -0
- data/docs/ImageOptimizerResponseProductProduct.md +11 -0
- data/docs/ImageOptimizerResponseService.md +10 -0
- data/docs/InlineResponse2003.md +2 -2
- data/docs/InlineResponse2004.md +1 -1
- data/docs/KvStoreApi.md +30 -30
- data/docs/{Batch.md → KvStoreBatchResponse.md} +2 -2
- data/docs/{BatchErrors.md → KvStoreBatchResponseErrors.md} +4 -4
- data/docs/{StoreResponse.md → KvStoreDetails.md} +2 -2
- data/docs/KvStoreItemApi.md +53 -50
- data/docs/KvStoreRequestCreate.md +10 -0
- data/docs/KvStoreUpsertBatch.md +14 -0
- data/docs/LogExplorerInsightsResponseBodyEnable.md +12 -0
- data/docs/LogExplorerInsightsResponseLinks.md +10 -0
- data/docs/LogExplorerInsightsResponseLinksLinks.md +11 -0
- data/docs/{BillingBandwidth.md → LogExplorerInsightsResponseProduct.md} +2 -3
- data/docs/LogExplorerInsightsResponseProductProduct.md +11 -0
- data/docs/LogExplorerInsightsResponseService.md +10 -0
- data/docs/LoggingAzureblobAdditional.md +1 -1
- data/docs/LoggingAzureblobApi.md +4 -4
- data/docs/LoggingAzureblobResponse.md +1 -1
- data/docs/{BillingInvoiceId.md → NgwafRequestEnable.md} +2 -2
- data/docs/NgwafRequestUpdateConfiguration.md +11 -0
- data/docs/NgwafResponseConfiguration.md +10 -0
- data/docs/{ConfiguredProductResponseConfiguration.md → NgwafResponseConfigurationConfiguration.md} +2 -2
- data/docs/NgwafResponseConfigure.md +13 -0
- data/docs/NgwafResponseEnable.md +12 -0
- data/docs/NgwafResponseLinks.md +10 -0
- data/docs/{ConfiguredProductResponseLinks.md → NgwafResponseLinksLinks.md} +1 -1
- data/docs/{InlineResponse2004Meta.md → NgwafResponseProduct.md} +2 -3
- data/docs/{ConfiguredProductResponseProduct.md → NgwafResponseProductProduct.md} +1 -1
- data/docs/NgwafResponseService.md +10 -0
- data/docs/ObjectStorageResponseBodyEnable.md +12 -0
- data/docs/ObjectStorageResponseCustomer.md +10 -0
- data/docs/ObjectStorageResponseLinks.md +10 -0
- data/docs/ObjectStorageResponseLinksLinks.md +10 -0
- data/docs/ObjectStorageResponseProduct.md +10 -0
- data/docs/ObjectStorageResponseProductProduct.md +11 -0
- data/docs/OriginInspectorMeasurements.md +4 -0
- data/docs/OriginInspectorResponseBodyEnable.md +12 -0
- data/docs/OriginInspectorResponseLinks.md +10 -0
- data/docs/OriginInspectorResponseLinksLinks.md +11 -0
- data/docs/OriginInspectorResponseProduct.md +10 -0
- data/docs/OriginInspectorResponseProductProduct.md +11 -0
- data/docs/OriginInspectorResponseService.md +10 -0
- data/docs/OriginInspectorValues.md +4 -0
- data/docs/ProductAiAcceleratorApi.md +115 -0
- data/docs/ProductBotManagementApi.md +130 -0
- data/docs/ProductBrotliCompressionApi.md +130 -0
- data/docs/ProductDdosProtectionApi.md +208 -0
- data/docs/ProductDomainInspectorApi.md +130 -0
- data/docs/ProductFanoutApi.md +130 -0
- data/docs/ProductImageOptimizerApi.md +130 -0
- data/docs/ProductLogExplorerInsightsApi.md +130 -0
- data/docs/ProductNgwafApi.md +210 -0
- data/docs/ProductObjectStorageApi.md +115 -0
- data/docs/ProductOriginInspectorApi.md +130 -0
- data/docs/ProductWebsocketsApi.md +130 -0
- data/docs/RealtimeEntryAggregated.md +18 -3
- data/docs/RealtimeMeasurements.md +18 -3
- data/docs/Results.md +25 -3
- data/docs/SnippetApi.md +17 -17
- data/docs/{SnippetResponseCommonAllOf.md → SnippetResponseAllOf.md} +1 -1
- data/docs/TlsBulkCertificatesApi.md +4 -0
- data/docs/Values.md +2 -0
- data/docs/WebsocketsResponseBodyEnable.md +12 -0
- data/docs/WebsocketsResponseLinks.md +10 -0
- data/docs/WebsocketsResponseLinksLinks.md +11 -0
- data/docs/WebsocketsResponseProduct.md +10 -0
- data/docs/WebsocketsResponseProductProduct.md +11 -0
- data/docs/{BillingEstimateLines.md → WebsocketsResponseService.md} +2 -2
- data/lib/fastly/api/acls_in_compute_api.rb +3 -3
- data/lib/fastly/api/automation_tokens_api.rb +6 -6
- data/lib/fastly/api/backend_api.rb +4 -4
- data/lib/fastly/api/billing_usage_metrics_api.rb +33 -30
- data/lib/fastly/api/header_api.rb +8 -8
- data/lib/fastly/api/kv_store_api.rb +53 -45
- data/lib/fastly/api/kv_store_item_api.rb +112 -100
- data/lib/fastly/api/logging_azureblob_api.rb +4 -4
- data/lib/fastly/api/product_ai_accelerator_api.rb +186 -0
- data/lib/fastly/api/product_bot_management_api.rb +207 -0
- data/lib/fastly/api/product_brotli_compression_api.rb +207 -0
- data/lib/fastly/api/product_ddos_protection_api.rb +340 -0
- data/lib/fastly/api/product_domain_inspector_api.rb +207 -0
- data/lib/fastly/api/product_fanout_api.rb +207 -0
- data/lib/fastly/api/product_image_optimizer_api.rb +207 -0
- data/lib/fastly/api/product_log_explorer_insights_api.rb +207 -0
- data/lib/fastly/api/product_ngwaf_api.rb +347 -0
- data/lib/fastly/api/product_object_storage_api.rb +186 -0
- data/lib/fastly/api/product_origin_inspector_api.rb +207 -0
- data/lib/fastly/api/product_websockets_api.rb +207 -0
- data/lib/fastly/api/snippet_api.rb +38 -38
- data/lib/fastly/api/tls_bulk_certificates_api.rb +6 -0
- data/lib/fastly/configuration.rb +248 -224
- data/lib/fastly/models/{billing_regions.rb → ai_accelerator_response_body_enable.rb} +31 -31
- data/lib/fastly/models/ai_accelerator_response_customer.rb +216 -0
- data/lib/fastly/models/ai_accelerator_response_customer_customer.rb +227 -0
- data/lib/fastly/models/{billing_estimate_invoice_id.rb → ai_accelerator_response_links.rb} +10 -10
- data/lib/fastly/models/ai_accelerator_response_links_links.rb +217 -0
- data/lib/fastly/models/{billing_response_item_items_data.rb → ai_accelerator_response_product.rb} +10 -12
- data/lib/fastly/models/ai_accelerator_response_product_product.rb +227 -0
- data/lib/fastly/models/automation_token.rb +1 -1
- data/lib/fastly/models/automation_token_create_request_attributes.rb +1 -1
- data/lib/fastly/models/automation_token_create_response.rb +21 -43
- data/lib/fastly/models/automation_token_create_response_all_of.rb +13 -12
- data/lib/fastly/models/automation_token_response.rb +24 -46
- data/lib/fastly/models/automation_token_response_all_of.rb +11 -10
- data/lib/fastly/models/backend.rb +1 -1
- data/lib/fastly/models/backend_response.rb +1 -1
- data/lib/fastly/models/bot_management_response_body_enable.rb +243 -0
- data/lib/fastly/models/bot_management_response_links.rb +216 -0
- data/lib/fastly/models/bot_management_response_links_links.rb +227 -0
- data/lib/fastly/models/bot_management_response_product.rb +216 -0
- data/lib/fastly/models/bot_management_response_product_product.rb +227 -0
- data/lib/fastly/models/bot_management_response_service.rb +216 -0
- data/lib/fastly/models/{enabled_product_response_service.rb → bot_management_response_service_service.rb} +3 -3
- data/lib/fastly/models/brotli_compression_response_body_enable.rb +243 -0
- data/lib/fastly/models/brotli_compression_response_links.rb +216 -0
- data/lib/fastly/models/brotli_compression_response_links_links.rb +227 -0
- data/lib/fastly/models/brotli_compression_response_product.rb +216 -0
- data/lib/fastly/models/brotli_compression_response_product_product.rb +227 -0
- data/lib/fastly/models/brotli_compression_response_service.rb +216 -0
- data/lib/fastly/models/{billing_bandwidth.rb → compute_acl_list.rb} +19 -18
- data/lib/fastly/models/compute_acl_list_entries_meta.rb +1 -1
- data/lib/fastly/models/compute_acl_list_meta.rb +218 -0
- data/lib/fastly/models/compute_acl_lookup.rb +2 -12
- data/lib/fastly/models/{snippet_all_of.rb → ddos_protection_request_update_configuration.rb} +24 -19
- data/lib/fastly/models/ddos_protection_response_configuration.rb +216 -0
- data/lib/fastly/models/ddos_protection_response_configuration_configuration.rb +217 -0
- data/lib/fastly/models/ddos_protection_response_configure.rb +253 -0
- data/lib/fastly/models/ddos_protection_response_enable.rb +243 -0
- data/lib/fastly/models/ddos_protection_response_links.rb +216 -0
- data/lib/fastly/models/ddos_protection_response_links_links.rb +227 -0
- data/lib/fastly/models/ddos_protection_response_product.rb +216 -0
- data/lib/fastly/models/ddos_protection_response_product_product.rb +227 -0
- data/lib/fastly/models/ddos_protection_response_service.rb +216 -0
- data/lib/fastly/models/domain_inspector_measurements.rb +21 -1
- data/lib/fastly/models/domain_inspector_response_body_enable.rb +243 -0
- data/lib/fastly/models/domain_inspector_response_links.rb +216 -0
- data/lib/fastly/models/domain_inspector_response_links_links.rb +227 -0
- data/lib/fastly/models/domain_inspector_response_product.rb +216 -0
- data/lib/fastly/models/domain_inspector_response_product_product.rb +227 -0
- data/lib/fastly/models/domain_inspector_response_service.rb +216 -0
- data/lib/fastly/models/fanout_response_body_enable.rb +243 -0
- data/lib/fastly/models/{store.rb → fanout_response_links.rb} +10 -11
- data/lib/fastly/models/{enabled_product_response_links.rb → fanout_response_links_links.rb} +3 -3
- data/lib/fastly/models/fanout_response_product.rb +216 -0
- data/lib/fastly/models/{enabled_product_response_product.rb → fanout_response_product_product.rb} +3 -3
- data/lib/fastly/models/fanout_response_service.rb +216 -0
- data/lib/fastly/models/header.rb +26 -4
- data/lib/fastly/models/header_response.rb +0 -1
- data/lib/fastly/models/image_optimizer_response_body_enable.rb +243 -0
- data/lib/fastly/models/image_optimizer_response_links.rb +216 -0
- data/lib/fastly/models/image_optimizer_response_links_links.rb +227 -0
- data/lib/fastly/models/image_optimizer_response_product.rb +216 -0
- data/lib/fastly/models/image_optimizer_response_product_product.rb +227 -0
- data/lib/fastly/models/image_optimizer_response_service.rb +216 -0
- data/lib/fastly/models/inline_response2003.rb +2 -2
- data/lib/fastly/models/inline_response2004.rb +1 -1
- data/lib/fastly/models/{batch.rb → kv_store_batch_response.rb} +5 -5
- data/lib/fastly/models/{batch_errors.rb → kv_store_batch_response_errors.rb} +6 -6
- data/lib/fastly/models/{store_response.rb → kv_store_details.rb} +4 -4
- data/lib/fastly/models/{legacy_waf_configuration_set.rb → kv_store_request_create.rb} +10 -15
- data/lib/fastly/models/{snippet_common.rb → kv_store_upsert_batch.rb} +55 -69
- data/lib/fastly/models/log_explorer_insights_response_body_enable.rb +243 -0
- data/lib/fastly/models/log_explorer_insights_response_links.rb +216 -0
- data/lib/fastly/models/log_explorer_insights_response_links_links.rb +227 -0
- data/lib/fastly/models/log_explorer_insights_response_product.rb +216 -0
- data/lib/fastly/models/log_explorer_insights_response_product_product.rb +227 -0
- data/lib/fastly/models/log_explorer_insights_response_service.rb +216 -0
- data/lib/fastly/models/logging_azureblob_additional.rb +1 -1
- data/lib/fastly/models/logging_azureblob_response.rb +1 -1
- data/lib/fastly/models/{set_workspace_id.rb → ngwaf_request_enable.rb} +9 -4
- data/lib/fastly/models/ngwaf_request_update_configuration.rb +227 -0
- data/lib/fastly/models/ngwaf_response_configuration.rb +216 -0
- data/lib/fastly/models/{configured_product_response_configuration.rb → ngwaf_response_configuration_configuration.rb} +4 -4
- data/lib/fastly/models/{configured_product_response.rb → ngwaf_response_configure.rb} +17 -7
- data/lib/fastly/models/{enabled_product_response.rb → ngwaf_response_enable.rb} +15 -6
- data/lib/fastly/models/{legacy_waf_tag.rb → ngwaf_response_links.rb} +10 -11
- data/lib/fastly/models/{configured_product_response_links.rb → ngwaf_response_links_links.rb} +3 -3
- data/lib/fastly/models/{billing_invoice_id.rb → ngwaf_response_product.rb} +10 -10
- data/lib/fastly/models/ngwaf_response_product_product.rb +227 -0
- data/lib/fastly/models/{billing_estimate_lines.rb → ngwaf_response_service.rb} +10 -12
- data/lib/fastly/models/{billing_total_extras.rb → object_storage_response_body_enable.rb} +31 -25
- data/lib/fastly/models/object_storage_response_customer.rb +216 -0
- data/lib/fastly/models/object_storage_response_links.rb +216 -0
- data/lib/fastly/models/object_storage_response_links_links.rb +217 -0
- data/lib/fastly/models/object_storage_response_product.rb +216 -0
- data/lib/fastly/models/object_storage_response_product_product.rb +227 -0
- data/lib/fastly/models/origin_inspector_measurements.rb +41 -1
- data/lib/fastly/models/origin_inspector_response_body_enable.rb +243 -0
- data/lib/fastly/models/origin_inspector_response_links.rb +216 -0
- data/lib/fastly/models/origin_inspector_response_links_links.rb +227 -0
- data/lib/fastly/models/origin_inspector_response_product.rb +216 -0
- data/lib/fastly/models/origin_inspector_response_product_product.rb +227 -0
- data/lib/fastly/models/origin_inspector_response_service.rb +216 -0
- data/lib/fastly/models/origin_inspector_values.rb +41 -1
- data/lib/fastly/models/realtime_entry_aggregated.rb +169 -19
- data/lib/fastly/models/realtime_measurements.rb +169 -19
- data/lib/fastly/models/results.rb +239 -19
- data/lib/fastly/models/schemas_snippet_response.rb +4 -2
- data/lib/fastly/models/snippet.rb +1 -8
- data/lib/fastly/models/snippet_response.rb +3 -1
- data/lib/fastly/models/{snippet_response_common_all_of.rb → snippet_response_all_of.rb} +3 -3
- data/lib/fastly/models/values.rb +21 -1
- data/lib/fastly/models/websockets_response_body_enable.rb +243 -0
- data/lib/fastly/models/websockets_response_links.rb +216 -0
- data/lib/fastly/models/websockets_response_links_links.rb +227 -0
- data/lib/fastly/models/websockets_response_product.rb +216 -0
- data/lib/fastly/models/{configured_product_response_product.rb → websockets_response_product_product.rb} +3 -3
- data/lib/fastly/models/websockets_response_service.rb +216 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +103 -61
- data/sig.json +1 -1
- metadata +211 -127
- data/docs/Billing.md +0 -16
- data/docs/BillingApi.md +0 -139
- data/docs/BillingBandwidthTiers.md +0 -14
- data/docs/BillingEstimateLinesLineItems.md +0 -18
- data/docs/BillingEstimateResponse.md +0 -18
- data/docs/BillingRegions.md +0 -13
- data/docs/BillingResponse.md +0 -18
- data/docs/BillingResponseLineItem.md +0 -29
- data/docs/BillingStatus.md +0 -11
- data/docs/BillingTotal.md +0 -25
- data/docs/BillingTotalExtras.md +0 -12
- data/docs/ConfiguredProductResponse.md +0 -13
- data/docs/EnabledProductResponse.md +0 -12
- data/docs/EnabledProductsApi.md +0 -220
- data/docs/HeaderResponseAdditional.md +0 -11
- data/docs/InlineResponse2003Meta.md +0 -11
- data/docs/LegacyWafConfigurationSet.md +0 -11
- data/docs/LegacyWafConfigurationSetsApi.md +0 -128
- data/docs/LegacyWafFirewall.md +0 -18
- data/docs/LegacyWafFirewallApi.md +0 -355
- data/docs/LegacyWafOwasp.md +0 -38
- data/docs/LegacyWafOwaspApi.md +0 -141
- data/docs/LegacyWafRule.md +0 -14
- data/docs/LegacyWafRuleApi.md +0 -187
- data/docs/LegacyWafRuleStatus.md +0 -12
- data/docs/LegacyWafRuleStatusApi.md +0 -205
- data/docs/LegacyWafRuleset.md +0 -11
- data/docs/LegacyWafRulesetApi.md +0 -139
- data/docs/LegacyWafTagApi.md +0 -61
- data/docs/LegacyWafUpdateStatus.md +0 -15
- data/docs/LegacyWafUpdateStatusApi.md +0 -105
- data/docs/LineItemData.md +0 -26
- data/docs/ReadOnlyVersion.md +0 -9
- data/docs/SchemasSnippetResponseCommon.md +0 -15
- data/docs/SetConfiguration.md +0 -12
- data/docs/SetWorkspaceId.md +0 -10
- data/docs/SnippetAllOf.md +0 -10
- data/docs/SnippetCommon.md +0 -13
- data/docs/SnippetResponseCommon.md +0 -15
- data/docs/SnippetResponsePost.md +0 -20
- data/docs/SnippetWithDynamicNumber.md +0 -14
- data/docs/SnippetWithDynamicNumberAllOf.md +0 -10
- data/docs/Store.md +0 -10
- data/lib/fastly/api/billing_api.rb +0 -229
- data/lib/fastly/api/enabled_products_api.rb +0 -382
- data/lib/fastly/api/legacy_waf_configuration_sets_api.rb +0 -209
- data/lib/fastly/api/legacy_waf_firewall_api.rb +0 -627
- data/lib/fastly/api/legacy_waf_owasp_api.rb +0 -244
- data/lib/fastly/api/legacy_waf_rule_api.rb +0 -307
- data/lib/fastly/api/legacy_waf_rule_status_api.rb +0 -366
- data/lib/fastly/api/legacy_waf_ruleset_api.rb +0 -237
- data/lib/fastly/api/legacy_waf_tag_api.rb +0 -96
- data/lib/fastly/api/legacy_waf_update_status_api.rb +0 -184
- data/lib/fastly/models/billing.rb +0 -278
- data/lib/fastly/models/billing_bandwidth_tiers.rb +0 -252
- data/lib/fastly/models/billing_estimate_lines_line_items.rb +0 -288
- data/lib/fastly/models/billing_estimate_response.rb +0 -307
- data/lib/fastly/models/billing_response.rb +0 -307
- data/lib/fastly/models/billing_response_line_item.rb +0 -418
- data/lib/fastly/models/billing_status.rb +0 -262
- data/lib/fastly/models/billing_total.rb +0 -371
- data/lib/fastly/models/header_response_additional.rb +0 -229
- data/lib/fastly/models/inline_response2003_meta.rb +0 -228
- data/lib/fastly/models/inline_response2004_meta.rb +0 -225
- data/lib/fastly/models/legacy_waf_firewall.rb +0 -297
- data/lib/fastly/models/legacy_waf_owasp.rb +0 -527
- data/lib/fastly/models/legacy_waf_rule.rb +0 -257
- data/lib/fastly/models/legacy_waf_rule_status.rb +0 -237
- data/lib/fastly/models/legacy_waf_ruleset.rb +0 -227
- data/lib/fastly/models/legacy_waf_update_status.rb +0 -267
- data/lib/fastly/models/line_item_data.rb +0 -377
- data/lib/fastly/models/read_only_service_id.rb +0 -207
- data/lib/fastly/models/read_only_version.rb +0 -207
- data/lib/fastly/models/schemas_snippet_response_common.rb +0 -276
- data/lib/fastly/models/set_configuration.rb +0 -237
- data/lib/fastly/models/snippet_response_common.rb +0 -276
- data/lib/fastly/models/snippet_response_post.rb +0 -374
- data/lib/fastly/models/snippet_with_dynamic_number.rb +0 -313
- data/lib/fastly/models/snippet_with_dynamic_number_all_of.rb +0 -251
@@ -19,14 +19,15 @@ module Fastly
|
|
19
19
|
|
20
20
|
attr_accessor :customer_id
|
21
21
|
|
22
|
-
|
23
|
-
|
24
|
-
# A UTC time-stamp of when the token was created.
|
22
|
+
# A UTC timestamp of when the token was created.
|
25
23
|
attr_accessor :created_at
|
26
24
|
|
27
25
|
attr_accessor :access_token
|
28
26
|
|
29
|
-
#
|
27
|
+
# Indicates whether TLS access is enabled for the token.
|
28
|
+
attr_accessor :tls_access
|
29
|
+
|
30
|
+
# A UTC timestamp of when the token was last used.
|
30
31
|
attr_accessor :last_used_at
|
31
32
|
|
32
33
|
# The User-Agent header of the client that last used the token.
|
@@ -38,9 +39,9 @@ module Fastly
|
|
38
39
|
:'id' => :'id',
|
39
40
|
:'user_id' => :'user_id',
|
40
41
|
:'customer_id' => :'customer_id',
|
41
|
-
:'sudo_expires_at' => :'sudo_expires_at',
|
42
42
|
:'created_at' => :'created_at',
|
43
43
|
:'access_token' => :'access_token',
|
44
|
+
:'tls_access' => :'tls_access',
|
44
45
|
:'last_used_at' => :'last_used_at',
|
45
46
|
:'user_agent' => :'user_agent'
|
46
47
|
}
|
@@ -57,9 +58,9 @@ module Fastly
|
|
57
58
|
:'id' => :'ReadOnlyId',
|
58
59
|
:'user_id' => :'ReadOnlyUserId',
|
59
60
|
:'customer_id' => :'ReadOnlyCustomerId',
|
60
|
-
:'sudo_expires_at' => :'Time',
|
61
61
|
:'created_at' => :'Time',
|
62
62
|
:'access_token' => :'String',
|
63
|
+
:'tls_access' => :'Boolean',
|
63
64
|
:'last_used_at' => :'Time',
|
64
65
|
:'user_agent' => :'String'
|
65
66
|
}
|
@@ -98,10 +99,6 @@ module Fastly
|
|
98
99
|
self.customer_id = attributes[:'customer_id']
|
99
100
|
end
|
100
101
|
|
101
|
-
if attributes.key?(:'sudo_expires_at')
|
102
|
-
self.sudo_expires_at = attributes[:'sudo_expires_at']
|
103
|
-
end
|
104
|
-
|
105
102
|
if attributes.key?(:'created_at')
|
106
103
|
self.created_at = attributes[:'created_at']
|
107
104
|
end
|
@@ -110,6 +107,10 @@ module Fastly
|
|
110
107
|
self.access_token = attributes[:'access_token']
|
111
108
|
end
|
112
109
|
|
110
|
+
if attributes.key?(:'tls_access')
|
111
|
+
self.tls_access = attributes[:'tls_access']
|
112
|
+
end
|
113
|
+
|
113
114
|
if attributes.key?(:'last_used_at')
|
114
115
|
self.last_used_at = attributes[:'last_used_at']
|
115
116
|
end
|
@@ -140,9 +141,9 @@ module Fastly
|
|
140
141
|
id == o.id &&
|
141
142
|
user_id == o.user_id &&
|
142
143
|
customer_id == o.customer_id &&
|
143
|
-
sudo_expires_at == o.sudo_expires_at &&
|
144
144
|
created_at == o.created_at &&
|
145
145
|
access_token == o.access_token &&
|
146
|
+
tls_access == o.tls_access &&
|
146
147
|
last_used_at == o.last_used_at &&
|
147
148
|
user_agent == o.user_agent
|
148
149
|
end
|
@@ -156,7 +157,7 @@ module Fastly
|
|
156
157
|
# Calculates hash code according to all attributes.
|
157
158
|
# @return [Integer] Hash code
|
158
159
|
def hash
|
159
|
-
[id, user_id, customer_id,
|
160
|
+
[id, user_id, customer_id, created_at, access_token, tls_access, last_used_at, user_agent].hash
|
160
161
|
end
|
161
162
|
|
162
163
|
# Builds the object from hash
|
@@ -24,18 +24,9 @@ module Fastly
|
|
24
24
|
# A space-delimited list of authorization scope.
|
25
25
|
attr_accessor :scope
|
26
26
|
|
27
|
-
# (optional) A UTC
|
27
|
+
# (optional) A UTC timestamp of when the token will expire.
|
28
28
|
attr_accessor :expires_at
|
29
29
|
|
30
|
-
# A UTC time-stamp of when the token was created.
|
31
|
-
attr_accessor :created_at
|
32
|
-
|
33
|
-
# Date and time in ISO 8601 format.
|
34
|
-
attr_accessor :deleted_at
|
35
|
-
|
36
|
-
# Date and time in ISO 8601 format.
|
37
|
-
attr_accessor :updated_at
|
38
|
-
|
39
30
|
attr_accessor :id
|
40
31
|
|
41
32
|
attr_accessor :customer_id
|
@@ -46,11 +37,15 @@ module Fastly
|
|
46
37
|
# The User-Agent header of the client that last used the token.
|
47
38
|
attr_accessor :user_agent
|
48
39
|
|
49
|
-
|
40
|
+
# Indicates whether TLS access is enabled for the token.
|
41
|
+
attr_accessor :tls_access
|
50
42
|
|
51
|
-
# A UTC
|
43
|
+
# A UTC timestamp of when the token was last used.
|
52
44
|
attr_accessor :last_used_at
|
53
45
|
|
46
|
+
# A UTC timestamp of when the token was created.
|
47
|
+
attr_accessor :created_at
|
48
|
+
|
54
49
|
class EnumAttributeValidator
|
55
50
|
attr_reader :datatype
|
56
51
|
attr_reader :allowable_values
|
@@ -81,15 +76,13 @@ module Fastly
|
|
81
76
|
:'services' => :'services',
|
82
77
|
:'scope' => :'scope',
|
83
78
|
:'expires_at' => :'expires_at',
|
84
|
-
:'created_at' => :'created_at',
|
85
|
-
:'deleted_at' => :'deleted_at',
|
86
|
-
:'updated_at' => :'updated_at',
|
87
79
|
:'id' => :'id',
|
88
80
|
:'customer_id' => :'customer_id',
|
89
81
|
:'ip' => :'ip',
|
90
82
|
:'user_agent' => :'user_agent',
|
91
|
-
:'
|
92
|
-
:'last_used_at' => :'last_used_at'
|
83
|
+
:'tls_access' => :'tls_access',
|
84
|
+
:'last_used_at' => :'last_used_at',
|
85
|
+
:'created_at' => :'created_at'
|
93
86
|
}
|
94
87
|
end
|
95
88
|
|
@@ -106,23 +99,19 @@ module Fastly
|
|
106
99
|
:'services' => :'Array<String>',
|
107
100
|
:'scope' => :'String',
|
108
101
|
:'expires_at' => :'String',
|
109
|
-
:'created_at' => :'String',
|
110
|
-
:'deleted_at' => :'Time',
|
111
|
-
:'updated_at' => :'Time',
|
112
102
|
:'id' => :'ReadOnlyId',
|
113
103
|
:'customer_id' => :'ReadOnlyCustomerId',
|
114
104
|
:'ip' => :'String',
|
115
105
|
:'user_agent' => :'String',
|
116
|
-
:'
|
117
|
-
:'last_used_at' => :'Time'
|
106
|
+
:'tls_access' => :'Boolean',
|
107
|
+
:'last_used_at' => :'Time',
|
108
|
+
:'created_at' => :'String'
|
118
109
|
}
|
119
110
|
end
|
120
111
|
|
121
112
|
# List of attributes with nullable: true
|
122
113
|
def self.fastly_nullable
|
123
114
|
Set.new([
|
124
|
-
:'deleted_at',
|
125
|
-
:'updated_at',
|
126
115
|
])
|
127
116
|
end
|
128
117
|
|
@@ -130,8 +119,7 @@ module Fastly
|
|
130
119
|
def self.fastly_all_of
|
131
120
|
[
|
132
121
|
:'AutomationToken',
|
133
|
-
:'AutomationTokenResponseAllOf'
|
134
|
-
:'Timestamps'
|
122
|
+
:'AutomationTokenResponseAllOf'
|
135
123
|
]
|
136
124
|
end
|
137
125
|
|
@@ -174,18 +162,6 @@ module Fastly
|
|
174
162
|
self.expires_at = attributes[:'expires_at']
|
175
163
|
end
|
176
164
|
|
177
|
-
if attributes.key?(:'created_at')
|
178
|
-
self.created_at = attributes[:'created_at']
|
179
|
-
end
|
180
|
-
|
181
|
-
if attributes.key?(:'deleted_at')
|
182
|
-
self.deleted_at = attributes[:'deleted_at']
|
183
|
-
end
|
184
|
-
|
185
|
-
if attributes.key?(:'updated_at')
|
186
|
-
self.updated_at = attributes[:'updated_at']
|
187
|
-
end
|
188
|
-
|
189
165
|
if attributes.key?(:'id')
|
190
166
|
self.id = attributes[:'id']
|
191
167
|
end
|
@@ -202,13 +178,17 @@ module Fastly
|
|
202
178
|
self.user_agent = attributes[:'user_agent']
|
203
179
|
end
|
204
180
|
|
205
|
-
if attributes.key?(:'
|
206
|
-
self.
|
181
|
+
if attributes.key?(:'tls_access')
|
182
|
+
self.tls_access = attributes[:'tls_access']
|
207
183
|
end
|
208
184
|
|
209
185
|
if attributes.key?(:'last_used_at')
|
210
186
|
self.last_used_at = attributes[:'last_used_at']
|
211
187
|
end
|
188
|
+
|
189
|
+
if attributes.key?(:'created_at')
|
190
|
+
self.created_at = attributes[:'created_at']
|
191
|
+
end
|
212
192
|
end
|
213
193
|
|
214
194
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -246,15 +226,13 @@ module Fastly
|
|
246
226
|
services == o.services &&
|
247
227
|
scope == o.scope &&
|
248
228
|
expires_at == o.expires_at &&
|
249
|
-
created_at == o.created_at &&
|
250
|
-
deleted_at == o.deleted_at &&
|
251
|
-
updated_at == o.updated_at &&
|
252
229
|
id == o.id &&
|
253
230
|
customer_id == o.customer_id &&
|
254
231
|
ip == o.ip &&
|
255
232
|
user_agent == o.user_agent &&
|
256
|
-
|
257
|
-
last_used_at == o.last_used_at
|
233
|
+
tls_access == o.tls_access &&
|
234
|
+
last_used_at == o.last_used_at &&
|
235
|
+
created_at == o.created_at
|
258
236
|
end
|
259
237
|
|
260
238
|
# @see the `==` method
|
@@ -266,7 +244,7 @@ module Fastly
|
|
266
244
|
# Calculates hash code according to all attributes.
|
267
245
|
# @return [Integer] Hash code
|
268
246
|
def hash
|
269
|
-
[name, role, services, scope, expires_at,
|
247
|
+
[name, role, services, scope, expires_at, id, customer_id, ip, user_agent, tls_access, last_used_at, created_at].hash
|
270
248
|
end
|
271
249
|
|
272
250
|
# Builds the object from hash
|
@@ -25,15 +25,16 @@ module Fastly
|
|
25
25
|
# The User-Agent header of the client that last used the token.
|
26
26
|
attr_accessor :user_agent
|
27
27
|
|
28
|
-
|
28
|
+
# Indicates whether TLS access is enabled for the token.
|
29
|
+
attr_accessor :tls_access
|
29
30
|
|
30
|
-
# A UTC
|
31
|
+
# A UTC timestamp of when the token was last used.
|
31
32
|
attr_accessor :last_used_at
|
32
33
|
|
33
|
-
# A UTC
|
34
|
+
# A UTC timestamp of when the token was created.
|
34
35
|
attr_accessor :created_at
|
35
36
|
|
36
|
-
# (optional) A UTC
|
37
|
+
# (optional) A UTC timestamp of when the token will expire.
|
37
38
|
attr_accessor :expires_at
|
38
39
|
|
39
40
|
# Attribute mapping from ruby-style variable name to JSON key.
|
@@ -44,7 +45,7 @@ module Fastly
|
|
44
45
|
:'role' => :'role',
|
45
46
|
:'ip' => :'ip',
|
46
47
|
:'user_agent' => :'user_agent',
|
47
|
-
:'
|
48
|
+
:'tls_access' => :'tls_access',
|
48
49
|
:'last_used_at' => :'last_used_at',
|
49
50
|
:'created_at' => :'created_at',
|
50
51
|
:'expires_at' => :'expires_at'
|
@@ -64,7 +65,7 @@ module Fastly
|
|
64
65
|
:'role' => :'String',
|
65
66
|
:'ip' => :'String',
|
66
67
|
:'user_agent' => :'String',
|
67
|
-
:'
|
68
|
+
:'tls_access' => :'Boolean',
|
68
69
|
:'last_used_at' => :'Time',
|
69
70
|
:'created_at' => :'String',
|
70
71
|
:'expires_at' => :'String'
|
@@ -112,8 +113,8 @@ module Fastly
|
|
112
113
|
self.user_agent = attributes[:'user_agent']
|
113
114
|
end
|
114
115
|
|
115
|
-
if attributes.key?(:'
|
116
|
-
self.
|
116
|
+
if attributes.key?(:'tls_access')
|
117
|
+
self.tls_access = attributes[:'tls_access']
|
117
118
|
end
|
118
119
|
|
119
120
|
if attributes.key?(:'last_used_at')
|
@@ -152,7 +153,7 @@ module Fastly
|
|
152
153
|
role == o.role &&
|
153
154
|
ip == o.ip &&
|
154
155
|
user_agent == o.user_agent &&
|
155
|
-
|
156
|
+
tls_access == o.tls_access &&
|
156
157
|
last_used_at == o.last_used_at &&
|
157
158
|
created_at == o.created_at &&
|
158
159
|
expires_at == o.expires_at
|
@@ -167,7 +168,7 @@ module Fastly
|
|
167
168
|
# Calculates hash code according to all attributes.
|
168
169
|
# @return [Integer] Hash code
|
169
170
|
def hash
|
170
|
-
[id, customer_id, role, ip, user_agent,
|
171
|
+
[id, customer_id, role, ip, user_agent, tls_access, last_used_at, created_at, expires_at].hash
|
171
172
|
end
|
172
173
|
|
173
174
|
# Builds the object from hash
|
@@ -46,7 +46,7 @@ module Fastly
|
|
46
46
|
# IPv6 address of the backend. May be used as an alternative to `address` to set the backend location.
|
47
47
|
attr_accessor :ipv6
|
48
48
|
|
49
|
-
# How long in seconds to keep a persistent connection to the backend between requests.
|
49
|
+
# How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can.
|
50
50
|
attr_accessor :keepalive_time
|
51
51
|
|
52
52
|
# Maximum number of concurrent connections this backend will accept.
|
@@ -46,7 +46,7 @@ module Fastly
|
|
46
46
|
# IPv6 address of the backend. May be used as an alternative to `address` to set the backend location.
|
47
47
|
attr_accessor :ipv6
|
48
48
|
|
49
|
-
# How long in seconds to keep a persistent connection to the backend between requests.
|
49
|
+
# How long in seconds to keep a persistent connection to the backend between requests. By default, Varnish keeps connections open as long as it can.
|
50
50
|
attr_accessor :keepalive_time
|
51
51
|
|
52
52
|
# Maximum number of concurrent connections this backend will accept.
|
@@ -0,0 +1,243 @@
|
|
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 BotManagementResponseBodyEnable
|
16
|
+
attr_accessor :product
|
17
|
+
|
18
|
+
attr_accessor :service
|
19
|
+
|
20
|
+
attr_accessor :_links
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'product' => :'product',
|
26
|
+
:'service' => :'service',
|
27
|
+
:'_links' => :'_links'
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Returns all the JSON keys this model knows about
|
32
|
+
def self.acceptable_attributes
|
33
|
+
attribute_map.values
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.fastly_types
|
38
|
+
{
|
39
|
+
:'product' => :'BotManagementResponseProductProduct',
|
40
|
+
:'service' => :'BotManagementResponseServiceService',
|
41
|
+
:'_links' => :'BotManagementResponseLinksLinks'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.fastly_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# List of class defined in allOf (OpenAPI v3)
|
52
|
+
def self.fastly_all_of
|
53
|
+
[
|
54
|
+
:'BotManagementResponseLinks',
|
55
|
+
:'BotManagementResponseProduct',
|
56
|
+
:'BotManagementResponseService'
|
57
|
+
]
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
if (!attributes.is_a?(Hash))
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::BotManagementResponseBodyEnable` initialize method"
|
65
|
+
end
|
66
|
+
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::BotManagementResponseBodyEnable`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
|
+
end
|
72
|
+
h[k.to_sym] = v
|
73
|
+
}
|
74
|
+
|
75
|
+
if attributes.key?(:'product')
|
76
|
+
self.product = attributes[:'product']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'service')
|
80
|
+
self.service = attributes[:'service']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'_links')
|
84
|
+
self._links = attributes[:'_links']
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
88
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
89
|
+
# @return Array for valid properties with the reasons
|
90
|
+
def list_invalid_properties
|
91
|
+
invalid_properties = Array.new
|
92
|
+
invalid_properties
|
93
|
+
end
|
94
|
+
|
95
|
+
# Check to see if the all the properties in the model are valid
|
96
|
+
# @return true if the model is valid
|
97
|
+
def valid?
|
98
|
+
true
|
99
|
+
end
|
100
|
+
|
101
|
+
# Checks equality by comparing each attribute.
|
102
|
+
# @param [Object] Object to be compared
|
103
|
+
def ==(o)
|
104
|
+
return true if self.equal?(o)
|
105
|
+
self.class == o.class &&
|
106
|
+
product == o.product &&
|
107
|
+
service == o.service &&
|
108
|
+
_links == o._links
|
109
|
+
end
|
110
|
+
|
111
|
+
# @see the `==` method
|
112
|
+
# @param [Object] Object to be compared
|
113
|
+
def eql?(o)
|
114
|
+
self == o
|
115
|
+
end
|
116
|
+
|
117
|
+
# Calculates hash code according to all attributes.
|
118
|
+
# @return [Integer] Hash code
|
119
|
+
def hash
|
120
|
+
[product, service, _links].hash
|
121
|
+
end
|
122
|
+
|
123
|
+
# Builds the object from hash
|
124
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
125
|
+
# @return [Object] Returns the model itself
|
126
|
+
def self.build_from_hash(attributes)
|
127
|
+
new.build_from_hash(attributes)
|
128
|
+
end
|
129
|
+
|
130
|
+
# Builds the object from hash
|
131
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
132
|
+
# @return [Object] Returns the model itself
|
133
|
+
def build_from_hash(attributes)
|
134
|
+
return nil unless attributes.is_a?(Hash)
|
135
|
+
self.class.fastly_types.each_pair do |key, type|
|
136
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
137
|
+
self.send("#{key}=", nil)
|
138
|
+
elsif type =~ /\AArray<(.*)>/i
|
139
|
+
# check to ensure the input is an array given that the attribute
|
140
|
+
# is documented as an array but the input is not
|
141
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
142
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
143
|
+
end
|
144
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
145
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
146
|
+
end
|
147
|
+
end
|
148
|
+
|
149
|
+
self
|
150
|
+
end
|
151
|
+
|
152
|
+
# Deserializes the data based on type
|
153
|
+
# @param string type Data type
|
154
|
+
# @param string value Value to be deserialized
|
155
|
+
# @return [Object] Deserialized data
|
156
|
+
def _deserialize(type, value)
|
157
|
+
case type.to_sym
|
158
|
+
when :Time
|
159
|
+
Time.parse(value)
|
160
|
+
when :Date
|
161
|
+
Date.parse(value)
|
162
|
+
when :String
|
163
|
+
value.to_s
|
164
|
+
when :Integer
|
165
|
+
value.to_i
|
166
|
+
when :Float
|
167
|
+
value.to_f
|
168
|
+
when :Boolean
|
169
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
170
|
+
true
|
171
|
+
else
|
172
|
+
false
|
173
|
+
end
|
174
|
+
when :Object
|
175
|
+
# generic object (usually a Hash), return directly
|
176
|
+
value
|
177
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
178
|
+
inner_type = Regexp.last_match[:inner_type]
|
179
|
+
value.map { |v| _deserialize(inner_type, v) }
|
180
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
181
|
+
k_type = Regexp.last_match[:k_type]
|
182
|
+
v_type = Regexp.last_match[:v_type]
|
183
|
+
{}.tap do |hash|
|
184
|
+
value.each do |k, v|
|
185
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
186
|
+
end
|
187
|
+
end
|
188
|
+
else # model
|
189
|
+
# models (e.g. Pet) or oneOf
|
190
|
+
klass = Fastly.const_get(type)
|
191
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
|
195
|
+
# Returns the string representation of the object
|
196
|
+
# @return [String] String presentation of the object
|
197
|
+
def to_s
|
198
|
+
to_hash.to_s
|
199
|
+
end
|
200
|
+
|
201
|
+
# to_body is an alias to to_hash (backward compatibility)
|
202
|
+
# @return [Hash] Returns the object in the form of hash
|
203
|
+
def to_body
|
204
|
+
to_hash
|
205
|
+
end
|
206
|
+
|
207
|
+
# Returns the object in the form of hash
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
209
|
+
def to_hash
|
210
|
+
hash = {}
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
212
|
+
value = self.send(attr)
|
213
|
+
if value.nil?
|
214
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
215
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
216
|
+
end
|
217
|
+
|
218
|
+
hash[param] = _to_hash(value)
|
219
|
+
end
|
220
|
+
hash
|
221
|
+
end
|
222
|
+
|
223
|
+
# Outputs non-array value in the form of hash
|
224
|
+
# For object, use to_hash. Otherwise, just return the value
|
225
|
+
# @param [Object] value Any valid value
|
226
|
+
# @return [Hash] Returns the value in the form of hash
|
227
|
+
def _to_hash(value)
|
228
|
+
if value.is_a?(Array)
|
229
|
+
value.compact.map { |v| _to_hash(v) }
|
230
|
+
elsif value.is_a?(Hash)
|
231
|
+
{}.tap do |hash|
|
232
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
233
|
+
end
|
234
|
+
elsif value.respond_to? :to_hash
|
235
|
+
value.to_hash
|
236
|
+
else
|
237
|
+
value
|
238
|
+
end
|
239
|
+
end
|
240
|
+
|
241
|
+
end
|
242
|
+
|
243
|
+
end
|