fastly 11.0.0 → 12.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 +29 -0
- data/Gemfile.lock +3 -3
- data/README.md +33 -43
- data/docs/AclsInComputeApi.md +1 -1
- data/docs/Backend.md +1 -0
- data/docs/BackendApi.md +4 -0
- data/docs/BackendResponse.md +1 -0
- data/docs/BotManagementResponseBodyGetAllServices.md +13 -0
- data/docs/{RelationshipWafFirewallWafFirewall.md → BotManagementResponseCustomer.md} +2 -2
- data/docs/{RelationshipWafActiveRulesWafActiveRules.md → BotManagementResponseCustomerCustomer.md} +3 -2
- data/docs/{RelationshipWafFirewall.md → BotManagementResponseEnabledServices.md} +2 -2
- data/docs/BotManagementResponseLinksGetAllServices.md +10 -0
- data/docs/BotManagementResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/BrotliCompressionResponseBodyGetAllServices.md +13 -0
- data/docs/BrotliCompressionResponseCustomer.md +10 -0
- data/docs/BrotliCompressionResponseEnabledServices.md +10 -0
- data/docs/{RelationshipWafRuleRevision.md → BrotliCompressionResponseLinksGetAllServices.md} +2 -2
- data/docs/BrotliCompressionResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/ComputeAclUpdateEntry.md +2 -2
- data/docs/{TypeWafRule.md → DdosProtectionAction.md} +1 -1
- data/docs/DdosProtectionApi.md +223 -0
- data/docs/DdosProtectionAttributeStats.md +11 -0
- data/docs/{RelationshipWafActiveRules.md → DdosProtectionAttributeValue.md} +3 -2
- data/docs/DdosProtectionError.md +13 -0
- data/docs/{IncludedWithWafFirewallVersionItem.md → DdosProtectionErrorErrors.md} +3 -2
- data/docs/DdosProtectionEvent.md +17 -0
- data/docs/DdosProtectionEventAllOf.md +15 -0
- data/docs/{RelationshipWafTags.md → DdosProtectionNotAuthenticated.md} +3 -2
- data/docs/DdosProtectionNotFound.md +11 -0
- data/docs/DdosProtectionResponseBodyGetAllServices.md +13 -0
- data/docs/DdosProtectionResponseCustomer.md +10 -0
- data/docs/DdosProtectionResponseEnabledServices.md +10 -0
- data/docs/{WafFirewall.md → DdosProtectionResponseLinksGetAllServices.md} +2 -2
- data/docs/{BulkWafActiveRules.md → DdosProtectionResponseLinksGetAllServicesLinks.md} +2 -2
- data/docs/DdosProtectionRule.md +22 -0
- data/docs/DdosProtectionRuleAllOf.md +20 -0
- data/docs/{TypeWafFirewallVersion.md → DdosProtectionTrafficAttribute.md} +1 -1
- data/docs/DdosProtectionTrafficStats.md +14 -0
- data/docs/DdosProtectionTrafficStatsAllOf.md +12 -0
- data/docs/DictionaryApi.md +15 -15
- data/docs/DictionaryInfoApi.md +3 -3
- data/docs/DictionaryItemApi.md +22 -22
- data/docs/DomainInspectorResponseBodyGetAllServices.md +13 -0
- data/docs/DomainInspectorResponseCustomer.md +10 -0
- data/docs/DomainInspectorResponseEnabledServices.md +10 -0
- data/docs/{WafExclusion.md → DomainInspectorResponseLinksGetAllServices.md} +2 -2
- data/docs/DomainInspectorResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/DomainOwnershipsApi.md +2 -2
- data/docs/FanoutResponseBodyGetAllServices.md +13 -0
- data/docs/FanoutResponseCustomer.md +10 -0
- data/docs/{RelationshipWafRules.md → FanoutResponseEnabledServices.md} +2 -2
- data/docs/FanoutResponseLinksGetAllServices.md +10 -0
- data/docs/{TypeWafFirewall.md → FanoutResponseLinksGetAllServicesLinks.md} +2 -1
- data/docs/HistoricalApi.md +10 -10
- data/docs/ImageOptimizerResponseBodyGetAllServices.md +13 -0
- data/docs/ImageOptimizerResponseCustomer.md +10 -0
- data/docs/ImageOptimizerResponseEnabledServices.md +10 -0
- data/docs/ImageOptimizerResponseLinksGetAllServices.md +10 -0
- data/docs/ImageOptimizerResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/InlineResponse2002.md +2 -1
- data/docs/InlineResponse2003.md +1 -1
- data/docs/InlineResponse2004.md +1 -2
- data/docs/InlineResponse2005.md +1 -1
- data/docs/InlineResponse2006.md +1 -1
- data/docs/InlineResponse2007.md +2 -1
- data/docs/InlineResponse2008.md +11 -0
- data/docs/InlineResponse2009.md +10 -0
- data/docs/KvStoreApi.md +2 -2
- data/docs/KvStoreItemApi.md +2 -2
- data/docs/KvStoreRequestCreate.md +1 -1
- data/docs/LogAggregationsFilterFieldItem.md +12 -0
- data/docs/LogAggregationsGetResponse.md +11 -0
- data/docs/LogAggregationsGetResponseMeta.md +15 -0
- data/docs/LogAggregationsGetResponseMetaFilters.md +10 -0
- data/docs/LogAggregationsResult.md +11 -0
- data/docs/{WafActiveRuleCreationResponse.md → LogAggregationsValueField.md} +19 -9
- data/docs/LogExplorerInsightsResponseBodyGetAllServices.md +13 -0
- data/docs/LogExplorerInsightsResponseCustomer.md +10 -0
- data/docs/LogExplorerInsightsResponseEnabledServices.md +10 -0
- data/docs/LogExplorerInsightsResponseLinksGetAllServices.md +10 -0
- data/docs/LogExplorerInsightsResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/LogTimeseriesFilterFieldItem.md +12 -0
- data/docs/LogTimeseriesGetResponse.md +11 -0
- data/docs/LogTimeseriesGetResponseMeta.md +14 -0
- data/docs/LogTimeseriesGetResponseMetaFilters.md +10 -0
- data/docs/LogTimeseriesResult.md +11 -0
- data/docs/{TypeWafActiveRule.md → LogTimeseriesResultDimensions.md} +2 -1
- data/docs/{WafRuleRevisionOrLatest.md → LogTimeseriesValueField.md} +15 -5
- data/docs/NgwafResponseBodyGetAllServices.md +13 -0
- data/docs/NgwafResponseCustomer.md +10 -0
- data/docs/{RelationshipWafRule.md → NgwafResponseEnabledServices.md} +2 -2
- data/docs/NgwafResponseLinksGetAllServices.md +10 -0
- data/docs/{TypeWafExclusion.md → NgwafResponseLinksGetAllServicesLinks.md} +2 -1
- data/docs/ObservabilityAggregationsForLogsApi.md +71 -0
- data/docs/ObservabilityTimeseriesForLogsApi.md +67 -0
- data/docs/OriginInspectorResponseBodyGetAllServices.md +13 -0
- data/docs/OriginInspectorResponseCustomer.md +10 -0
- data/docs/OriginInspectorResponseEnabledServices.md +10 -0
- data/docs/OriginInspectorResponseLinksGetAllServices.md +10 -0
- data/docs/OriginInspectorResponseLinksGetAllServicesLinks.md +10 -0
- data/docs/ProductBotManagementApi.md +33 -0
- data/docs/ProductBrotliCompressionApi.md +33 -0
- data/docs/ProductDdosProtectionApi.md +34 -1
- data/docs/ProductDomainInspectorApi.md +33 -0
- data/docs/ProductFanoutApi.md +33 -0
- data/docs/ProductImageOptimizerApi.md +33 -0
- data/docs/ProductLogExplorerInsightsApi.md +33 -0
- data/docs/ProductNgwafApi.md +33 -0
- data/docs/ProductOriginInspectorApi.md +33 -0
- data/docs/ProductWebsocketsApi.md +33 -0
- data/docs/RateLimiter.md +1 -1
- data/docs/RateLimiterApi.md +4 -4
- data/docs/RateLimiterResponse.md +1 -1
- data/docs/Resource.md +1 -1
- data/docs/ResourceApi.md +4 -4
- data/docs/ResourceResponse.md +1 -1
- data/docs/SecretStoreApi.md +2 -2
- data/docs/SecretStoreItemApi.md +2 -2
- data/docs/ServiceAuthorizationsApi.md +2 -2
- data/docs/WebsocketsResponseBodyGetAllServices.md +13 -0
- data/docs/WebsocketsResponseCustomer.md +10 -0
- data/docs/{RelationshipWafRuleWafRule.md → WebsocketsResponseEnabledServices.md} +2 -2
- data/docs/WebsocketsResponseLinksGetAllServices.md +10 -0
- data/docs/WebsocketsResponseLinksGetAllServicesLinks.md +10 -0
- data/lib/fastly/api/acls_in_compute_api.rb +2 -2
- data/lib/fastly/api/backend_api.rb +6 -0
- data/lib/fastly/api/ddos_protection_api.rb +367 -0
- data/lib/fastly/api/dictionary_api.rb +10 -10
- data/lib/fastly/api/dictionary_info_api.rb +2 -2
- data/lib/fastly/api/dictionary_item_api.rb +18 -18
- data/lib/fastly/api/domain_ownerships_api.rb +3 -3
- data/lib/fastly/api/historical_api.rb +15 -15
- 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/observability_aggregations_for_logs_api.rb +128 -0
- data/lib/fastly/api/observability_timeseries_for_logs_api.rb +132 -0
- data/lib/fastly/api/product_bot_management_api.rb +56 -0
- data/lib/fastly/api/product_brotli_compression_api.rb +56 -0
- data/lib/fastly/api/product_ddos_protection_api.rb +58 -2
- data/lib/fastly/api/product_domain_inspector_api.rb +56 -0
- data/lib/fastly/api/product_fanout_api.rb +56 -0
- data/lib/fastly/api/product_image_optimizer_api.rb +56 -0
- data/lib/fastly/api/product_log_explorer_insights_api.rb +56 -0
- data/lib/fastly/api/product_ngwaf_api.rb +56 -0
- data/lib/fastly/api/product_origin_inspector_api.rb +56 -0
- data/lib/fastly/api/product_websockets_api.rb +56 -0
- data/lib/fastly/api/rate_limiter_api.rb +4 -4
- data/lib/fastly/api/resource_api.rb +4 -4
- 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 +102 -174
- data/lib/fastly/models/backend.rb +11 -1
- data/lib/fastly/models/backend_response.rb +11 -1
- data/lib/fastly/models/{waf_firewall_versions_response.rb → bot_management_response_body_get_all_services.rb} +34 -33
- data/lib/fastly/models/bot_management_response_customer.rb +216 -0
- data/lib/fastly/models/{relationship_member_waf_active_rule.rb → bot_management_response_customer_customer.rb} +18 -18
- data/lib/fastly/models/bot_management_response_enabled_services.rb +219 -0
- data/lib/fastly/models/{relationship_waf_active_rules_waf_active_rules.rb → bot_management_response_links_get_all_services.rb} +10 -12
- data/lib/fastly/models/bot_management_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/brotli_compression_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/brotli_compression_response_customer.rb +216 -0
- data/lib/fastly/models/brotli_compression_response_enabled_services.rb +219 -0
- data/lib/fastly/models/brotli_compression_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/brotli_compression_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/compute_acl_update_entry.rb +2 -2
- data/lib/fastly/models/{type_waf_exclusion.rb → ddos_protection_action.rb} +7 -4
- data/lib/fastly/models/{waf_tag_attributes.rb → ddos_protection_attribute_stats.rb} +19 -7
- data/lib/fastly/models/{relationship_member_waf_rule_revision.rb → ddos_protection_attribute_value.rb} +17 -19
- data/lib/fastly/models/{included_with_waf_firewall_version_item.rb → ddos_protection_error.rb} +39 -30
- data/lib/fastly/models/{relationship_member_waf_rule.rb → ddos_protection_error_errors.rb} +16 -18
- data/lib/fastly/models/{waf_rule_response_data.rb → ddos_protection_event.rb} +72 -26
- data/lib/fastly/models/{included_with_waf_active_rule_item.rb → ddos_protection_event_all_of.rb} +51 -48
- data/lib/fastly/models/{waf_active_rule_data_attributes.rb → ddos_protection_not_authenticated.rb} +13 -24
- data/lib/fastly/models/{waf_firewall_version_data.rb → ddos_protection_not_found.rb} +50 -18
- data/lib/fastly/models/ddos_protection_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/ddos_protection_response_customer.rb +216 -0
- data/lib/fastly/models/ddos_protection_response_enabled_services.rb +219 -0
- data/lib/fastly/models/ddos_protection_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/ddos_protection_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/{waf_exclusion_response_data_attributes.rb → ddos_protection_rule.rb} +102 -104
- data/lib/fastly/models/{included_with_waf_rule_item.rb → ddos_protection_rule_all_of.rb} +109 -41
- data/lib/fastly/models/{type_waf_firewall.rb → ddos_protection_traffic_attribute.rb} +10 -4
- data/lib/fastly/models/{waf_active_rule_response_data_attributes.rb → ddos_protection_traffic_stats.rb} +31 -31
- data/lib/fastly/models/{waf_rule_revision.rb → ddos_protection_traffic_stats_all_of.rb} +22 -21
- data/lib/fastly/models/domain_inspector_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/domain_inspector_response_customer.rb +216 -0
- data/lib/fastly/models/domain_inspector_response_enabled_services.rb +219 -0
- data/lib/fastly/models/{relationship_waf_firewall_waf_firewall.rb → domain_inspector_response_links_get_all_services.rb} +10 -12
- data/lib/fastly/models/{relationship_waf_firewall.rb → domain_inspector_response_links_get_all_services_links.rb} +11 -10
- data/lib/fastly/models/{waf_firewalls_response.rb → fanout_response_body_get_all_services.rb} +34 -33
- data/lib/fastly/models/{relationship_waf_tags.rb → fanout_response_customer.rb} +10 -10
- data/lib/fastly/models/{relationship_member_waf_firewall.rb → fanout_response_enabled_services.rb} +13 -21
- data/lib/fastly/models/fanout_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/{relationship_waf_rules.rb → fanout_response_links_get_all_services_links.rb} +11 -10
- data/lib/fastly/models/image_optimizer_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/image_optimizer_response_customer.rb +216 -0
- data/lib/fastly/models/image_optimizer_response_enabled_services.rb +219 -0
- data/lib/fastly/models/image_optimizer_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/image_optimizer_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/inline_response2002.rb +18 -8
- data/lib/fastly/models/inline_response2003.rb +1 -1
- data/lib/fastly/models/inline_response2004.rb +8 -18
- data/lib/fastly/models/inline_response2005.rb +1 -1
- data/lib/fastly/models/inline_response2006.rb +1 -1
- data/lib/fastly/models/inline_response2007.rb +13 -4
- data/lib/fastly/models/{relationship_waf_firewall_version_waf_firewall_version.rb → inline_response2008.rb} +16 -7
- data/lib/fastly/models/{bulk_waf_active_rules.rb → inline_response2009.rb} +4 -4
- data/lib/fastly/models/kv_store_request_create.rb +1 -1
- data/lib/fastly/models/{waf_rule_attributes.rb → log_aggregations_filter_field_item.rb} +33 -45
- data/lib/fastly/models/{relationship_waf_rule_waf_rule.rb → log_aggregations_get_response.rb} +16 -7
- data/lib/fastly/models/{waf_firewall_version_response_data.rb → log_aggregations_get_response_meta.rb} +77 -39
- data/lib/fastly/models/log_aggregations_get_response_meta_filters.rb +220 -0
- data/lib/fastly/models/{waf_rules_response_all_of.rb → log_aggregations_result.rb} +18 -18
- data/lib/fastly/models/{waf_active_rule_creation_response.rb → log_aggregations_value_field.rb} +8 -3
- data/lib/fastly/models/log_explorer_insights_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/log_explorer_insights_response_customer.rb +216 -0
- data/lib/fastly/models/log_explorer_insights_response_enabled_services.rb +219 -0
- data/lib/fastly/models/log_explorer_insights_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/log_explorer_insights_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/{relationships_for_waf_exclusion.rb → log_timeseries_filter_field_item.rb} +61 -35
- data/lib/fastly/models/{waf_tags_response_all_of.rb → log_timeseries_get_response.rb} +11 -13
- data/lib/fastly/models/{included_with_waf_exclusion_item.rb → log_timeseries_get_response_meta.rb} +44 -45
- data/lib/fastly/models/log_timeseries_get_response_meta_filters.rb +220 -0
- data/lib/fastly/models/{waf_firewall_response.rb → log_timeseries_result.rb} +17 -17
- data/lib/fastly/models/{waf_exclusion_response.rb → log_timeseries_result_dimensions.rb} +10 -10
- data/lib/fastly/models/{waf_rule_revision_or_latest.rb → log_timeseries_value_field.rb} +6 -1
- data/lib/fastly/models/{waf_exclusions_response.rb → ngwaf_response_body_get_all_services.rb} +34 -33
- data/lib/fastly/models/{waf_active_rule_response.rb → ngwaf_response_customer.rb} +10 -10
- data/lib/fastly/models/{relationship_waf_rule_revisions.rb → ngwaf_response_enabled_services.rb} +13 -10
- data/lib/fastly/models/{waf_rule_revision_response_data_all_of.rb → ngwaf_response_links_get_all_services.rb} +10 -10
- data/lib/fastly/models/{relationship_waf_rule.rb → ngwaf_response_links_get_all_services_links.rb} +11 -10
- data/lib/fastly/models/origin_inspector_response_body_get_all_services.rb +256 -0
- data/lib/fastly/models/origin_inspector_response_customer.rb +216 -0
- data/lib/fastly/models/origin_inspector_response_enabled_services.rb +219 -0
- data/lib/fastly/models/origin_inspector_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/origin_inspector_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/models/pop.rb +6 -6
- data/lib/fastly/models/rate_limiter.rb +1 -1
- data/lib/fastly/models/rate_limiter_response.rb +1 -1
- data/lib/fastly/models/resource.rb +1 -1
- data/lib/fastly/models/resource_response.rb +1 -1
- data/lib/fastly/models/{waf_active_rules_response.rb → websockets_response_body_get_all_services.rb} +34 -33
- data/lib/fastly/models/{relationship_waf_tags_waf_tags.rb → websockets_response_customer.rb} +10 -12
- data/lib/fastly/models/websockets_response_enabled_services.rb +219 -0
- data/lib/fastly/models/websockets_response_links_get_all_services.rb +216 -0
- data/lib/fastly/models/websockets_response_links_get_all_services_links.rb +217 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +83 -109
- data/sig.json +1 -1
- metadata +168 -220
- data/docs/IncludedWithWafActiveRuleItem.md +0 -13
- data/docs/IncludedWithWafExclusionItem.md +0 -12
- data/docs/IncludedWithWafRuleItem.md +0 -12
- data/docs/RelationshipMemberWafActiveRule.md +0 -11
- data/docs/RelationshipMemberWafFirewall.md +0 -11
- data/docs/RelationshipMemberWafFirewallVersion.md +0 -11
- data/docs/RelationshipMemberWafRule.md +0 -11
- data/docs/RelationshipMemberWafRuleRevision.md +0 -11
- data/docs/RelationshipMemberWafTag.md +0 -11
- data/docs/RelationshipWafFirewallVersion.md +0 -10
- data/docs/RelationshipWafFirewallVersionWafFirewallVersion.md +0 -10
- data/docs/RelationshipWafFirewallVersions.md +0 -10
- data/docs/RelationshipWafRuleRevisionWafRuleRevisions.md +0 -10
- data/docs/RelationshipWafRuleRevisions.md +0 -10
- data/docs/RelationshipWafTagsWafTags.md +0 -10
- data/docs/RelationshipsForWafActiveRule.md +0 -11
- data/docs/RelationshipsForWafExclusion.md +0 -11
- data/docs/RelationshipsForWafFirewallVersion.md +0 -11
- data/docs/RelationshipsForWafRule.md +0 -11
- data/docs/SchemasWafFirewallVersion.md +0 -10
- data/docs/SchemasWafFirewallVersionData.md +0 -11
- data/docs/TypeWafRuleRevision.md +0 -9
- data/docs/TypeWafTag.md +0 -9
- data/docs/WafActiveRule.md +0 -10
- data/docs/WafActiveRuleData.md +0 -12
- data/docs/WafActiveRuleDataAttributes.md +0 -12
- data/docs/WafActiveRuleResponse.md +0 -10
- data/docs/WafActiveRuleResponseData.md +0 -13
- data/docs/WafActiveRuleResponseDataAllOf.md +0 -12
- data/docs/WafActiveRuleResponseDataAttributes.md +0 -14
- data/docs/WafActiveRuleResponseDataAttributesAllOf.md +0 -11
- data/docs/WafActiveRuleResponseDataRelationships.md +0 -11
- data/docs/WafActiveRulesApi.md +0 -367
- data/docs/WafActiveRulesResponse.md +0 -13
- data/docs/WafActiveRulesResponseAllOf.md +0 -11
- data/docs/WafExclusionData.md +0 -12
- data/docs/WafExclusionDataAttributes.md +0 -15
- data/docs/WafExclusionResponse.md +0 -10
- data/docs/WafExclusionResponseData.md +0 -13
- data/docs/WafExclusionResponseDataAllOf.md +0 -12
- data/docs/WafExclusionResponseDataAttributes.md +0 -18
- data/docs/WafExclusionResponseDataAttributesAllOf.md +0 -15
- data/docs/WafExclusionResponseDataRelationships.md +0 -11
- data/docs/WafExclusionsApi.md +0 -238
- data/docs/WafExclusionsResponse.md +0 -13
- data/docs/WafExclusionsResponseAllOf.md +0 -11
- data/docs/WafFirewallData.md +0 -11
- data/docs/WafFirewallDataAttributes.md +0 -13
- data/docs/WafFirewallResponse.md +0 -11
- data/docs/WafFirewallResponseData.md +0 -13
- data/docs/WafFirewallResponseDataAllOf.md +0 -12
- data/docs/WafFirewallResponseDataAttributes.md +0 -21
- data/docs/WafFirewallResponseDataAttributesAllOf.md +0 -18
- data/docs/WafFirewallVersion.md +0 -10
- data/docs/WafFirewallVersionData.md +0 -11
- data/docs/WafFirewallVersionDataAttributes.md +0 -40
- data/docs/WafFirewallVersionResponse.md +0 -11
- data/docs/WafFirewallVersionResponseData.md +0 -13
- data/docs/WafFirewallVersionResponseDataAllOf.md +0 -12
- data/docs/WafFirewallVersionResponseDataAttributes.md +0 -24
- data/docs/WafFirewallVersionResponseDataAttributesAllOf.md +0 -21
- data/docs/WafFirewallVersionsApi.md +0 -265
- data/docs/WafFirewallVersionsResponse.md +0 -13
- data/docs/WafFirewallVersionsResponseAllOf.md +0 -11
- data/docs/WafFirewallsApi.md +0 -222
- data/docs/WafFirewallsResponse.md +0 -13
- data/docs/WafFirewallsResponseAllOf.md +0 -11
- data/docs/WafRule.md +0 -12
- data/docs/WafRuleAttributes.md +0 -12
- data/docs/WafRuleResponse.md +0 -11
- data/docs/WafRuleResponseData.md +0 -13
- data/docs/WafRuleResponseDataAllOf.md +0 -10
- data/docs/WafRuleRevision.md +0 -12
- data/docs/WafRuleRevisionAttributes.md +0 -17
- data/docs/WafRuleRevisionResponse.md +0 -11
- data/docs/WafRuleRevisionResponseData.md +0 -13
- data/docs/WafRuleRevisionResponseDataAllOf.md +0 -10
- data/docs/WafRuleRevisionsApi.md +0 -103
- data/docs/WafRuleRevisionsResponse.md +0 -13
- data/docs/WafRuleRevisionsResponseAllOf.md +0 -11
- data/docs/WafRulesApi.md +0 -107
- data/docs/WafRulesResponse.md +0 -13
- data/docs/WafRulesResponseAllOf.md +0 -11
- data/docs/WafTag.md +0 -12
- data/docs/WafTagAttributes.md +0 -10
- data/docs/WafTagsApi.md +0 -61
- data/docs/WafTagsResponse.md +0 -13
- data/docs/WafTagsResponseAllOf.md +0 -11
- data/docs/WafTagsResponseDataItem.md +0 -13
- data/lib/fastly/api/waf_active_rules_api.rb +0 -667
- data/lib/fastly/api/waf_exclusions_api.rb +0 -433
- data/lib/fastly/api/waf_firewall_versions_api.rb +0 -460
- data/lib/fastly/api/waf_firewalls_api.rb +0 -377
- data/lib/fastly/api/waf_rule_revisions_api.rb +0 -177
- data/lib/fastly/api/waf_rules_api.rb +0 -171
- data/lib/fastly/api/waf_tags_api.rb +0 -100
- data/lib/fastly/models/relationship_member_waf_firewall_version.rb +0 -228
- data/lib/fastly/models/relationship_member_waf_tag.rb +0 -228
- data/lib/fastly/models/relationship_waf_active_rules.rb +0 -216
- data/lib/fastly/models/relationship_waf_firewall_version.rb +0 -216
- data/lib/fastly/models/relationship_waf_firewall_versions.rb +0 -216
- data/lib/fastly/models/relationship_waf_rule_revision.rb +0 -216
- data/lib/fastly/models/relationship_waf_rule_revision_waf_rule_revisions.rb +0 -218
- data/lib/fastly/models/relationships_for_waf_active_rule.rb +0 -245
- data/lib/fastly/models/relationships_for_waf_firewall_version.rb +0 -245
- data/lib/fastly/models/relationships_for_waf_rule.rb +0 -245
- data/lib/fastly/models/schemas_waf_firewall_version.rb +0 -216
- data/lib/fastly/models/schemas_waf_firewall_version_data.rb +0 -227
- data/lib/fastly/models/type_waf_active_rule.rb +0 -34
- data/lib/fastly/models/type_waf_firewall_version.rb +0 -34
- data/lib/fastly/models/type_waf_rule.rb +0 -34
- data/lib/fastly/models/type_waf_rule_revision.rb +0 -34
- data/lib/fastly/models/type_waf_tag.rb +0 -34
- data/lib/fastly/models/waf_active_rule.rb +0 -216
- data/lib/fastly/models/waf_active_rule_data.rb +0 -236
- data/lib/fastly/models/waf_active_rule_response_data.rb +0 -253
- data/lib/fastly/models/waf_active_rule_response_data_all_of.rb +0 -234
- data/lib/fastly/models/waf_active_rule_response_data_attributes_all_of.rb +0 -227
- data/lib/fastly/models/waf_active_rule_response_data_relationships.rb +0 -245
- data/lib/fastly/models/waf_active_rules_response_all_of.rb +0 -229
- data/lib/fastly/models/waf_exclusion.rb +0 -216
- data/lib/fastly/models/waf_exclusion_data.rb +0 -236
- data/lib/fastly/models/waf_exclusion_data_attributes.rb +0 -316
- data/lib/fastly/models/waf_exclusion_response_data.rb +0 -254
- data/lib/fastly/models/waf_exclusion_response_data_all_of.rb +0 -235
- data/lib/fastly/models/waf_exclusion_response_data_attributes_all_of.rb +0 -316
- data/lib/fastly/models/waf_exclusion_response_data_relationships.rb +0 -245
- data/lib/fastly/models/waf_exclusions_response_all_of.rb +0 -229
- data/lib/fastly/models/waf_firewall.rb +0 -216
- data/lib/fastly/models/waf_firewall_data.rb +0 -227
- data/lib/fastly/models/waf_firewall_data_attributes.rb +0 -248
- data/lib/fastly/models/waf_firewall_response_data.rb +0 -253
- data/lib/fastly/models/waf_firewall_response_data_all_of.rb +0 -234
- data/lib/fastly/models/waf_firewall_response_data_attributes.rb +0 -337
- data/lib/fastly/models/waf_firewall_response_data_attributes_all_of.rb +0 -296
- data/lib/fastly/models/waf_firewall_version.rb +0 -216
- data/lib/fastly/models/waf_firewall_version_data_attributes.rb +0 -551
- data/lib/fastly/models/waf_firewall_version_response.rb +0 -227
- data/lib/fastly/models/waf_firewall_version_response_data_all_of.rb +0 -235
- data/lib/fastly/models/waf_firewall_version_response_data_attributes.rb +0 -403
- data/lib/fastly/models/waf_firewall_version_response_data_attributes_all_of.rb +0 -362
- data/lib/fastly/models/waf_firewall_versions_response_all_of.rb +0 -229
- data/lib/fastly/models/waf_firewalls_response_all_of.rb +0 -229
- data/lib/fastly/models/waf_rule.rb +0 -236
- data/lib/fastly/models/waf_rule_response.rb +0 -227
- data/lib/fastly/models/waf_rule_response_data_all_of.rb +0 -216
- data/lib/fastly/models/waf_rule_revision_attributes.rb +0 -321
- data/lib/fastly/models/waf_rule_revision_response.rb +0 -227
- data/lib/fastly/models/waf_rule_revision_response_data.rb +0 -254
- data/lib/fastly/models/waf_rule_revisions_response.rb +0 -255
- data/lib/fastly/models/waf_rule_revisions_response_all_of.rb +0 -229
- data/lib/fastly/models/waf_rules_response.rb +0 -255
- data/lib/fastly/models/waf_tag.rb +0 -237
- data/lib/fastly/models/waf_tags_response.rb +0 -255
- data/lib/fastly/models/waf_tags_response_data_item.rb +0 -254
@@ -1,403 +0,0 @@
|
|
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 WafFirewallVersionResponseDataAttributes
|
16
|
-
# Date and time in ISO 8601 format.
|
17
|
-
attr_accessor :created_at
|
18
|
-
|
19
|
-
# Date and time in ISO 8601 format.
|
20
|
-
attr_accessor :deleted_at
|
21
|
-
|
22
|
-
# Date and time in ISO 8601 format.
|
23
|
-
attr_accessor :updated_at
|
24
|
-
|
25
|
-
# Whether a specific firewall version is currently deployed.
|
26
|
-
attr_accessor :active
|
27
|
-
|
28
|
-
# The number of active Fastly rules set to block.
|
29
|
-
attr_accessor :active_rules_fastly_block_count
|
30
|
-
|
31
|
-
# The number of active Fastly rules set to log.
|
32
|
-
attr_accessor :active_rules_fastly_log_count
|
33
|
-
|
34
|
-
# The number of active Fastly rules set to score.
|
35
|
-
attr_accessor :active_rules_fastly_score_count
|
36
|
-
|
37
|
-
# The number of active OWASP rules set to block.
|
38
|
-
attr_accessor :active_rules_owasp_block_count
|
39
|
-
|
40
|
-
# The number of active OWASP rules set to log.
|
41
|
-
attr_accessor :active_rules_owasp_log_count
|
42
|
-
|
43
|
-
# The number of active OWASP rules set to score.
|
44
|
-
attr_accessor :active_rules_owasp_score_count
|
45
|
-
|
46
|
-
# The number of active Trustwave rules set to block.
|
47
|
-
attr_accessor :active_rules_trustwave_block_count
|
48
|
-
|
49
|
-
# The number of active Trustwave rules set to log.
|
50
|
-
attr_accessor :active_rules_trustwave_log_count
|
51
|
-
|
52
|
-
# The status of the last deployment of this firewall version.
|
53
|
-
attr_accessor :last_deployment_status
|
54
|
-
|
55
|
-
# Time-stamp (GMT) indicating when the firewall version was last deployed.
|
56
|
-
attr_accessor :deployed_at
|
57
|
-
|
58
|
-
# Contains error message if the firewall version fails to deploy.
|
59
|
-
attr_accessor :error
|
60
|
-
|
61
|
-
class EnumAttributeValidator
|
62
|
-
attr_reader :datatype
|
63
|
-
attr_reader :allowable_values
|
64
|
-
|
65
|
-
def initialize(datatype, allowable_values)
|
66
|
-
@allowable_values = allowable_values.map do |value|
|
67
|
-
case datatype.to_s
|
68
|
-
when /Integer/i
|
69
|
-
value.to_i
|
70
|
-
when /Float/i
|
71
|
-
value.to_f
|
72
|
-
else
|
73
|
-
value
|
74
|
-
end
|
75
|
-
end
|
76
|
-
end
|
77
|
-
|
78
|
-
def valid?(value)
|
79
|
-
!value || allowable_values.include?(value)
|
80
|
-
end
|
81
|
-
end
|
82
|
-
|
83
|
-
# Attribute mapping from ruby-style variable name to JSON key.
|
84
|
-
def self.attribute_map
|
85
|
-
{
|
86
|
-
:'created_at' => :'created_at',
|
87
|
-
:'deleted_at' => :'deleted_at',
|
88
|
-
:'updated_at' => :'updated_at',
|
89
|
-
:'active' => :'active',
|
90
|
-
:'active_rules_fastly_block_count' => :'active_rules_fastly_block_count',
|
91
|
-
:'active_rules_fastly_log_count' => :'active_rules_fastly_log_count',
|
92
|
-
:'active_rules_fastly_score_count' => :'active_rules_fastly_score_count',
|
93
|
-
:'active_rules_owasp_block_count' => :'active_rules_owasp_block_count',
|
94
|
-
:'active_rules_owasp_log_count' => :'active_rules_owasp_log_count',
|
95
|
-
:'active_rules_owasp_score_count' => :'active_rules_owasp_score_count',
|
96
|
-
:'active_rules_trustwave_block_count' => :'active_rules_trustwave_block_count',
|
97
|
-
:'active_rules_trustwave_log_count' => :'active_rules_trustwave_log_count',
|
98
|
-
:'last_deployment_status' => :'last_deployment_status',
|
99
|
-
:'deployed_at' => :'deployed_at',
|
100
|
-
:'error' => :'error'
|
101
|
-
}
|
102
|
-
end
|
103
|
-
|
104
|
-
# Returns all the JSON keys this model knows about
|
105
|
-
def self.acceptable_attributes
|
106
|
-
attribute_map.values
|
107
|
-
end
|
108
|
-
|
109
|
-
# Attribute type mapping.
|
110
|
-
def self.fastly_types
|
111
|
-
{
|
112
|
-
:'created_at' => :'Time',
|
113
|
-
:'deleted_at' => :'Time',
|
114
|
-
:'updated_at' => :'Time',
|
115
|
-
:'active' => :'Boolean',
|
116
|
-
:'active_rules_fastly_block_count' => :'Integer',
|
117
|
-
:'active_rules_fastly_log_count' => :'Integer',
|
118
|
-
:'active_rules_fastly_score_count' => :'Integer',
|
119
|
-
:'active_rules_owasp_block_count' => :'Integer',
|
120
|
-
:'active_rules_owasp_log_count' => :'Integer',
|
121
|
-
:'active_rules_owasp_score_count' => :'Integer',
|
122
|
-
:'active_rules_trustwave_block_count' => :'Integer',
|
123
|
-
:'active_rules_trustwave_log_count' => :'Integer',
|
124
|
-
:'last_deployment_status' => :'String',
|
125
|
-
:'deployed_at' => :'String',
|
126
|
-
:'error' => :'String'
|
127
|
-
}
|
128
|
-
end
|
129
|
-
|
130
|
-
# List of attributes with nullable: true
|
131
|
-
def self.fastly_nullable
|
132
|
-
Set.new([
|
133
|
-
:'created_at',
|
134
|
-
:'deleted_at',
|
135
|
-
:'updated_at',
|
136
|
-
:'last_deployment_status',
|
137
|
-
])
|
138
|
-
end
|
139
|
-
|
140
|
-
# List of class defined in allOf (OpenAPI v3)
|
141
|
-
def self.fastly_all_of
|
142
|
-
[
|
143
|
-
:'Timestamps',
|
144
|
-
:'WafFirewallVersionResponseDataAttributesAllOf'
|
145
|
-
]
|
146
|
-
end
|
147
|
-
|
148
|
-
# Initializes the object
|
149
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
150
|
-
def initialize(attributes = {})
|
151
|
-
if (!attributes.is_a?(Hash))
|
152
|
-
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::WafFirewallVersionResponseDataAttributes` initialize method"
|
153
|
-
end
|
154
|
-
|
155
|
-
# check to see if the attribute exists and convert string to symbol for hash key
|
156
|
-
attributes = attributes.each_with_object({}) { |(k, v), h|
|
157
|
-
if (!self.class.attribute_map.key?(k.to_sym))
|
158
|
-
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::WafFirewallVersionResponseDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
159
|
-
end
|
160
|
-
h[k.to_sym] = v
|
161
|
-
}
|
162
|
-
|
163
|
-
if attributes.key?(:'created_at')
|
164
|
-
self.created_at = attributes[:'created_at']
|
165
|
-
end
|
166
|
-
|
167
|
-
if attributes.key?(:'deleted_at')
|
168
|
-
self.deleted_at = attributes[:'deleted_at']
|
169
|
-
end
|
170
|
-
|
171
|
-
if attributes.key?(:'updated_at')
|
172
|
-
self.updated_at = attributes[:'updated_at']
|
173
|
-
end
|
174
|
-
|
175
|
-
if attributes.key?(:'active')
|
176
|
-
self.active = attributes[:'active']
|
177
|
-
end
|
178
|
-
|
179
|
-
if attributes.key?(:'active_rules_fastly_block_count')
|
180
|
-
self.active_rules_fastly_block_count = attributes[:'active_rules_fastly_block_count']
|
181
|
-
end
|
182
|
-
|
183
|
-
if attributes.key?(:'active_rules_fastly_log_count')
|
184
|
-
self.active_rules_fastly_log_count = attributes[:'active_rules_fastly_log_count']
|
185
|
-
end
|
186
|
-
|
187
|
-
if attributes.key?(:'active_rules_fastly_score_count')
|
188
|
-
self.active_rules_fastly_score_count = attributes[:'active_rules_fastly_score_count']
|
189
|
-
end
|
190
|
-
|
191
|
-
if attributes.key?(:'active_rules_owasp_block_count')
|
192
|
-
self.active_rules_owasp_block_count = attributes[:'active_rules_owasp_block_count']
|
193
|
-
end
|
194
|
-
|
195
|
-
if attributes.key?(:'active_rules_owasp_log_count')
|
196
|
-
self.active_rules_owasp_log_count = attributes[:'active_rules_owasp_log_count']
|
197
|
-
end
|
198
|
-
|
199
|
-
if attributes.key?(:'active_rules_owasp_score_count')
|
200
|
-
self.active_rules_owasp_score_count = attributes[:'active_rules_owasp_score_count']
|
201
|
-
end
|
202
|
-
|
203
|
-
if attributes.key?(:'active_rules_trustwave_block_count')
|
204
|
-
self.active_rules_trustwave_block_count = attributes[:'active_rules_trustwave_block_count']
|
205
|
-
end
|
206
|
-
|
207
|
-
if attributes.key?(:'active_rules_trustwave_log_count')
|
208
|
-
self.active_rules_trustwave_log_count = attributes[:'active_rules_trustwave_log_count']
|
209
|
-
end
|
210
|
-
|
211
|
-
if attributes.key?(:'last_deployment_status')
|
212
|
-
self.last_deployment_status = attributes[:'last_deployment_status']
|
213
|
-
end
|
214
|
-
|
215
|
-
if attributes.key?(:'deployed_at')
|
216
|
-
self.deployed_at = attributes[:'deployed_at']
|
217
|
-
end
|
218
|
-
|
219
|
-
if attributes.key?(:'error')
|
220
|
-
self.error = attributes[:'error']
|
221
|
-
end
|
222
|
-
end
|
223
|
-
|
224
|
-
# Show invalid properties with the reasons. Usually used together with valid?
|
225
|
-
# @return Array for valid properties with the reasons
|
226
|
-
def list_invalid_properties
|
227
|
-
invalid_properties = Array.new
|
228
|
-
invalid_properties
|
229
|
-
end
|
230
|
-
|
231
|
-
# Check to see if the all the properties in the model are valid
|
232
|
-
# @return true if the model is valid
|
233
|
-
def valid?
|
234
|
-
last_deployment_status_validator = EnumAttributeValidator.new('String', ["null", "pending", "in progress", "completed", "failed"])
|
235
|
-
return false unless last_deployment_status_validator.valid?(@last_deployment_status)
|
236
|
-
true
|
237
|
-
end
|
238
|
-
|
239
|
-
# Custom attribute writer method checking allowed values (enum).
|
240
|
-
# @param [Object] last_deployment_status Object to be assigned
|
241
|
-
def last_deployment_status=(last_deployment_status)
|
242
|
-
validator = EnumAttributeValidator.new('String', ["null", "pending", "in progress", "completed", "failed"])
|
243
|
-
unless validator.valid?(last_deployment_status)
|
244
|
-
fail ArgumentError, "invalid value for \"last_deployment_status\", must be one of #{validator.allowable_values}."
|
245
|
-
end
|
246
|
-
@last_deployment_status = last_deployment_status
|
247
|
-
end
|
248
|
-
|
249
|
-
# Checks equality by comparing each attribute.
|
250
|
-
# @param [Object] Object to be compared
|
251
|
-
def ==(o)
|
252
|
-
return true if self.equal?(o)
|
253
|
-
self.class == o.class &&
|
254
|
-
created_at == o.created_at &&
|
255
|
-
deleted_at == o.deleted_at &&
|
256
|
-
updated_at == o.updated_at &&
|
257
|
-
active == o.active &&
|
258
|
-
active_rules_fastly_block_count == o.active_rules_fastly_block_count &&
|
259
|
-
active_rules_fastly_log_count == o.active_rules_fastly_log_count &&
|
260
|
-
active_rules_fastly_score_count == o.active_rules_fastly_score_count &&
|
261
|
-
active_rules_owasp_block_count == o.active_rules_owasp_block_count &&
|
262
|
-
active_rules_owasp_log_count == o.active_rules_owasp_log_count &&
|
263
|
-
active_rules_owasp_score_count == o.active_rules_owasp_score_count &&
|
264
|
-
active_rules_trustwave_block_count == o.active_rules_trustwave_block_count &&
|
265
|
-
active_rules_trustwave_log_count == o.active_rules_trustwave_log_count &&
|
266
|
-
last_deployment_status == o.last_deployment_status &&
|
267
|
-
deployed_at == o.deployed_at &&
|
268
|
-
error == o.error
|
269
|
-
end
|
270
|
-
|
271
|
-
# @see the `==` method
|
272
|
-
# @param [Object] Object to be compared
|
273
|
-
def eql?(o)
|
274
|
-
self == o
|
275
|
-
end
|
276
|
-
|
277
|
-
# Calculates hash code according to all attributes.
|
278
|
-
# @return [Integer] Hash code
|
279
|
-
def hash
|
280
|
-
[created_at, deleted_at, updated_at, active, active_rules_fastly_block_count, active_rules_fastly_log_count, active_rules_fastly_score_count, active_rules_owasp_block_count, active_rules_owasp_log_count, active_rules_owasp_score_count, active_rules_trustwave_block_count, active_rules_trustwave_log_count, last_deployment_status, deployed_at, error].hash
|
281
|
-
end
|
282
|
-
|
283
|
-
# Builds the object from hash
|
284
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
285
|
-
# @return [Object] Returns the model itself
|
286
|
-
def self.build_from_hash(attributes)
|
287
|
-
new.build_from_hash(attributes)
|
288
|
-
end
|
289
|
-
|
290
|
-
# Builds the object from hash
|
291
|
-
# @param [Hash] attributes Model attributes in the form of hash
|
292
|
-
# @return [Object] Returns the model itself
|
293
|
-
def build_from_hash(attributes)
|
294
|
-
return nil unless attributes.is_a?(Hash)
|
295
|
-
self.class.fastly_types.each_pair do |key, type|
|
296
|
-
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
297
|
-
self.send("#{key}=", nil)
|
298
|
-
elsif type =~ /\AArray<(.*)>/i
|
299
|
-
# check to ensure the input is an array given that the attribute
|
300
|
-
# is documented as an array but the input is not
|
301
|
-
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
302
|
-
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
303
|
-
end
|
304
|
-
elsif !attributes[self.class.attribute_map[key]].nil?
|
305
|
-
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
306
|
-
end
|
307
|
-
end
|
308
|
-
|
309
|
-
self
|
310
|
-
end
|
311
|
-
|
312
|
-
# Deserializes the data based on type
|
313
|
-
# @param string type Data type
|
314
|
-
# @param string value Value to be deserialized
|
315
|
-
# @return [Object] Deserialized data
|
316
|
-
def _deserialize(type, value)
|
317
|
-
case type.to_sym
|
318
|
-
when :Time
|
319
|
-
Time.parse(value)
|
320
|
-
when :Date
|
321
|
-
Date.parse(value)
|
322
|
-
when :String
|
323
|
-
value.to_s
|
324
|
-
when :Integer
|
325
|
-
value.to_i
|
326
|
-
when :Float
|
327
|
-
value.to_f
|
328
|
-
when :Boolean
|
329
|
-
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
330
|
-
true
|
331
|
-
else
|
332
|
-
false
|
333
|
-
end
|
334
|
-
when :Object
|
335
|
-
# generic object (usually a Hash), return directly
|
336
|
-
value
|
337
|
-
when /\AArray<(?<inner_type>.+)>\z/
|
338
|
-
inner_type = Regexp.last_match[:inner_type]
|
339
|
-
value.map { |v| _deserialize(inner_type, v) }
|
340
|
-
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
341
|
-
k_type = Regexp.last_match[:k_type]
|
342
|
-
v_type = Regexp.last_match[:v_type]
|
343
|
-
{}.tap do |hash|
|
344
|
-
value.each do |k, v|
|
345
|
-
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
346
|
-
end
|
347
|
-
end
|
348
|
-
else # model
|
349
|
-
# models (e.g. Pet) or oneOf
|
350
|
-
klass = Fastly.const_get(type)
|
351
|
-
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
352
|
-
end
|
353
|
-
end
|
354
|
-
|
355
|
-
# Returns the string representation of the object
|
356
|
-
# @return [String] String presentation of the object
|
357
|
-
def to_s
|
358
|
-
to_hash.to_s
|
359
|
-
end
|
360
|
-
|
361
|
-
# to_body is an alias to to_hash (backward compatibility)
|
362
|
-
# @return [Hash] Returns the object in the form of hash
|
363
|
-
def to_body
|
364
|
-
to_hash
|
365
|
-
end
|
366
|
-
|
367
|
-
# Returns the object in the form of hash
|
368
|
-
# @return [Hash] Returns the object in the form of hash
|
369
|
-
def to_hash
|
370
|
-
hash = {}
|
371
|
-
self.class.attribute_map.each_pair do |attr, param|
|
372
|
-
value = self.send(attr)
|
373
|
-
if value.nil?
|
374
|
-
is_nullable = self.class.fastly_nullable.include?(attr)
|
375
|
-
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
376
|
-
end
|
377
|
-
|
378
|
-
hash[param] = _to_hash(value)
|
379
|
-
end
|
380
|
-
hash
|
381
|
-
end
|
382
|
-
|
383
|
-
# Outputs non-array value in the form of hash
|
384
|
-
# For object, use to_hash. Otherwise, just return the value
|
385
|
-
# @param [Object] value Any valid value
|
386
|
-
# @return [Hash] Returns the value in the form of hash
|
387
|
-
def _to_hash(value)
|
388
|
-
if value.is_a?(Array)
|
389
|
-
value.compact.map { |v| _to_hash(v) }
|
390
|
-
elsif value.is_a?(Hash)
|
391
|
-
{}.tap do |hash|
|
392
|
-
value.each { |k, v| hash[k] = _to_hash(v) }
|
393
|
-
end
|
394
|
-
elsif value.respond_to? :to_hash
|
395
|
-
value.to_hash
|
396
|
-
else
|
397
|
-
value
|
398
|
-
end
|
399
|
-
end
|
400
|
-
|
401
|
-
end
|
402
|
-
|
403
|
-
end
|