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.
Files changed (308) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +58 -0
  3. data/Gemfile.lock +1 -1
  4. data/README.md +101 -58
  5. data/docs/Action.md +11 -0
  6. data/docs/ActionType.md +9 -0
  7. data/docs/AgentKey.md +14 -0
  8. data/docs/AgentKeyMeta.md +10 -0
  9. data/docs/Backend.md +3 -1
  10. data/docs/BackendApi.md +12 -4
  11. data/docs/BackendResponse.md +3 -1
  12. data/docs/BotManagementRequestUpdateConfiguration.md +10 -0
  13. data/docs/BotManagementResponseConfiguration.md +10 -0
  14. data/docs/BotManagementResponseConfigurationConfiguration.md +10 -0
  15. data/docs/BotManagementResponseConfigure.md +13 -0
  16. data/docs/ClientSideProtectionApi.md +821 -0
  17. data/docs/ConditionOperator.md +9 -0
  18. data/docs/ConditionType.md +9 -0
  19. data/docs/DdosProtectionApi.md +4 -4
  20. data/docs/Directive.md +11 -0
  21. data/docs/DmDomainsApi.md +2 -2
  22. data/docs/DmRoutingConfigsApi.md +912 -0
  23. data/docs/DomainOwnershipsApi.md +2 -2
  24. data/docs/DomainResearchApi.md +2 -2
  25. data/docs/DraftDiff.md +12 -0
  26. data/docs/DraftUpdate.md +10 -0
  27. data/docs/EventsResponse.md +1 -1
  28. data/docs/HeaderEvent.md +14 -0
  29. data/docs/InitialVersion.md +12 -0
  30. data/docs/InitialVersionPath.md +11 -0
  31. data/docs/InlineResponse20010.md +2 -2
  32. data/docs/InlineResponse20011.md +2 -2
  33. data/docs/InlineResponse20012.md +1 -1
  34. data/docs/InlineResponse20013.md +2 -2
  35. data/docs/InlineResponse20014.md +2 -1
  36. data/docs/InlineResponse20015.md +10 -0
  37. data/docs/InlineResponse20016.md +10 -0
  38. data/docs/InlineResponse20017.md +11 -0
  39. data/docs/InlineResponse20018.md +11 -0
  40. data/docs/InlineResponse20019.md +11 -0
  41. data/docs/InlineResponse20020.md +11 -0
  42. data/docs/InlineResponse20021.md +11 -0
  43. data/docs/InlineResponse20022.md +10 -0
  44. data/docs/InlineResponse2005.md +2 -2
  45. data/docs/InlineResponse2006.md +2 -2
  46. data/docs/InlineResponse2007.md +2 -2
  47. data/docs/InlineResponse2008.md +2 -1
  48. data/docs/InlineResponse2009.md +2 -1
  49. data/docs/InvitationsResponse.md +1 -1
  50. data/docs/KvStoreApi.md +2 -2
  51. data/docs/KvStoreItemApi.md +2 -2
  52. data/docs/KvStoreResponseBodyEnable.md +12 -0
  53. data/docs/KvStoreResponseCustomer.md +10 -0
  54. data/docs/KvStoreResponseLinks.md +10 -0
  55. data/docs/KvStoreResponseLinksLinks.md +10 -0
  56. data/docs/KvStoreResponseProduct.md +10 -0
  57. data/docs/KvStoreResponseProductProduct.md +11 -0
  58. data/docs/LoggingAzureblobApi.md +4 -4
  59. data/docs/LoggingAzureblobResponse.md +1 -1
  60. data/docs/LoggingCloudfilesApi.md +4 -4
  61. data/docs/LoggingCloudfilesResponse.md +1 -1
  62. data/docs/LoggingDigitaloceanApi.md +4 -4
  63. data/docs/LoggingDigitaloceanResponse.md +1 -1
  64. data/docs/LoggingFtpApi.md +4 -4
  65. data/docs/LoggingFtpResponse.md +1 -1
  66. data/docs/LoggingGcsApi.md +4 -4
  67. data/docs/LoggingGcsResponse.md +1 -1
  68. data/docs/LoggingGenericCommon.md +1 -1
  69. data/docs/LoggingGenericCommonResponse.md +1 -1
  70. data/docs/LoggingGenericCommonResponseAllOf.md +1 -1
  71. data/docs/LoggingHttpsAdditional.md +1 -1
  72. data/docs/LoggingHttpsApi.md +4 -4
  73. data/docs/LoggingHttpsResponse.md +1 -1
  74. data/docs/LoggingOpenstackApi.md +4 -4
  75. data/docs/LoggingOpenstackResponse.md +1 -1
  76. data/docs/LoggingS3Api.md +4 -4
  77. data/docs/LoggingS3Response.md +1 -1
  78. data/docs/LoggingSftpApi.md +4 -4
  79. data/docs/LoggingSftpResponse.md +1 -1
  80. data/docs/LoggingSumologicAdditional.md +1 -1
  81. data/docs/LoggingSumologicApi.md +4 -4
  82. data/docs/LoggingSumologicResponse.md +1 -1
  83. data/docs/LoggingSyslogAdditional.md +1 -1
  84. data/docs/LoggingSyslogApi.md +4 -4
  85. data/docs/LoggingSyslogResponse.md +1 -1
  86. data/docs/MutualAuthenticationsResponse.md +1 -1
  87. data/docs/NgwafAgentKeysApi.md +55 -0
  88. data/docs/NgwafSimulateApi.md +61 -0
  89. data/docs/Notification.md +11 -0
  90. data/docs/NotificationConfig.md +10 -0
  91. data/docs/Page.md +17 -0
  92. data/docs/PageCreate.md +14 -0
  93. data/docs/PageUpdate.md +14 -0
  94. data/docs/Pagination.md +1 -1
  95. data/docs/PaginationMeta.md +4 -4
  96. data/docs/PaginationMeta1.md +13 -0
  97. data/docs/PathChange.md +15 -0
  98. data/docs/PathCreate.md +10 -0
  99. data/docs/PathResponse.md +14 -0
  100. data/docs/PathResponseAllOf.md +12 -0
  101. data/docs/PathUpdate.md +10 -0
  102. data/docs/PathWithRules.md +11 -0
  103. data/docs/PathsResponse.md +11 -0
  104. data/docs/Policy.md +17 -0
  105. data/docs/PolicyCreate.md +13 -0
  106. data/docs/PolicyUpdate.md +13 -0
  107. data/docs/Position.md +11 -0
  108. data/docs/ProductBotManagementApi.md +78 -0
  109. data/docs/ProductKvStoreApi.md +115 -0
  110. data/docs/RealtimeEntry.md +1 -1
  111. data/docs/RealtimeEntryAggregated.md +34 -3
  112. data/docs/RealtimeEntryDatacenter.md +345 -0
  113. data/docs/RealtimeMeasurements.md +34 -3
  114. data/docs/Report.md +15 -0
  115. data/docs/RequestBodyForCreate.md +1 -0
  116. data/docs/RequestBodyForUpdate.md +1 -0
  117. data/docs/Results.md +34 -3
  118. data/docs/RoutingConfig.md +11 -0
  119. data/docs/RoutingConfigCondition.md +13 -0
  120. data/docs/RoutingConfigResponse.md +16 -0
  121. data/docs/RoutingConfigResponseAllOf.md +14 -0
  122. data/docs/RoutingConfigState.md +9 -0
  123. data/docs/RoutingConfigVersionResponse.md +13 -0
  124. data/docs/RoutingConfigsResponse.md +11 -0
  125. data/docs/RuleChange.md +12 -0
  126. data/docs/RuleCreate.md +12 -0
  127. data/docs/RuleResponse.md +15 -0
  128. data/docs/RuleResponseAllOf.md +13 -0
  129. data/docs/RuleUpdate.md +12 -0
  130. data/docs/RulesResponse.md +11 -0
  131. data/docs/Script.md +20 -0
  132. data/docs/ScriptUpdate.md +12 -0
  133. data/docs/SecretStoreApi.md +2 -2
  134. data/docs/SecretStoreItemApi.md +2 -2
  135. data/docs/SecurityHeader.md +12 -0
  136. data/docs/ServiceAuthorizationsApi.md +2 -2
  137. data/docs/ServiceAuthorizationsResponse.md +1 -1
  138. data/docs/SuccessfulResponseAsObject.md +1 -0
  139. data/docs/SuccessfulResponseAsObjectAllOf.md +1 -0
  140. data/docs/TlsActivationsResponse.md +1 -1
  141. data/docs/TlsBulkCertificatesResponse.md +1 -1
  142. data/docs/TlsCertificatesResponse.md +1 -1
  143. data/docs/TlsConfigurationsResponse.md +1 -1
  144. data/docs/TlsDomainsResponse.md +1 -1
  145. data/docs/TlsPrivateKeysResponse.md +1 -1
  146. data/docs/TlsSubscriptionsResponse.md +1 -1
  147. data/docs/VersionsResponse.md +11 -0
  148. data/docs/WafSimulateRequest.md +11 -0
  149. data/docs/WafSimulateResponse.md +11 -0
  150. data/docs/WafSimulateSignal.md +16 -0
  151. data/docs/Website.md +14 -0
  152. data/docs/WebsiteCreate.md +10 -0
  153. data/docs/WebsiteUpdate.md +10 -0
  154. data/lib/fastly/api/backend_api.rb +16 -4
  155. data/lib/fastly/api/client_side_protection_api.rb +1465 -0
  156. data/lib/fastly/api/ddos_protection_api.rb +6 -6
  157. data/lib/fastly/api/dm_domains_api.rb +3 -3
  158. data/lib/fastly/api/dm_routing_configs_api.rb +1596 -0
  159. data/lib/fastly/api/domain_ownerships_api.rb +3 -3
  160. data/lib/fastly/api/domain_research_api.rb +3 -3
  161. data/lib/fastly/api/kv_store_api.rb +3 -3
  162. data/lib/fastly/api/kv_store_item_api.rb +3 -3
  163. data/lib/fastly/api/logging_azureblob_api.rb +6 -6
  164. data/lib/fastly/api/logging_cloudfiles_api.rb +6 -6
  165. data/lib/fastly/api/logging_digitalocean_api.rb +6 -6
  166. data/lib/fastly/api/logging_ftp_api.rb +6 -6
  167. data/lib/fastly/api/logging_gcs_api.rb +6 -6
  168. data/lib/fastly/api/logging_https_api.rb +4 -4
  169. data/lib/fastly/api/logging_openstack_api.rb +6 -6
  170. data/lib/fastly/api/logging_s3_api.rb +6 -6
  171. data/lib/fastly/api/logging_sftp_api.rb +6 -6
  172. data/lib/fastly/api/logging_sumologic_api.rb +4 -4
  173. data/lib/fastly/api/logging_syslog_api.rb +4 -4
  174. data/lib/fastly/api/ngwaf_agent_keys_api.rb +83 -0
  175. data/lib/fastly/api/ngwaf_simulate_api.rb +95 -0
  176. data/lib/fastly/api/product_bot_management_api.rb +133 -0
  177. data/lib/fastly/api/product_kv_store_api.rb +186 -0
  178. data/lib/fastly/api/secret_store_api.rb +3 -3
  179. data/lib/fastly/api/secret_store_item_api.rb +3 -3
  180. data/lib/fastly/api/service_authorizations_api.rb +3 -3
  181. data/lib/fastly/configuration.rb +294 -0
  182. data/lib/fastly/models/action.rb +237 -0
  183. data/lib/fastly/models/action_type.rb +34 -0
  184. data/lib/fastly/models/agent_key.rb +283 -0
  185. data/lib/fastly/models/agent_key_meta.rb +223 -0
  186. data/lib/fastly/models/backend.rb +24 -2
  187. data/lib/fastly/models/backend_response.rb +24 -2
  188. data/lib/fastly/models/bot_management_request_update_configuration.rb +256 -0
  189. data/lib/fastly/models/bot_management_response_configuration.rb +216 -0
  190. data/lib/fastly/models/bot_management_response_configuration_configuration.rb +217 -0
  191. data/lib/fastly/models/bot_management_response_configure.rb +253 -0
  192. data/lib/fastly/models/condition_operator.rb +37 -0
  193. data/lib/fastly/models/condition_type.rb +34 -0
  194. data/lib/fastly/models/directive.rb +229 -0
  195. data/lib/fastly/models/draft_diff.rb +244 -0
  196. data/lib/fastly/models/draft_update.rb +218 -0
  197. data/lib/fastly/models/events_response.rb +1 -1
  198. data/lib/fastly/models/header_event.rb +252 -0
  199. data/lib/fastly/models/initial_version.rb +242 -0
  200. data/lib/fastly/models/initial_version_path.rb +254 -0
  201. data/lib/fastly/models/inline_response20010.rb +2 -2
  202. data/lib/fastly/models/inline_response20011.rb +2 -2
  203. data/lib/fastly/models/inline_response20012.rb +1 -1
  204. data/lib/fastly/models/inline_response20013.rb +11 -1
  205. data/lib/fastly/models/inline_response20014.rb +15 -4
  206. data/lib/fastly/models/inline_response20015.rb +217 -0
  207. data/lib/fastly/models/inline_response20016.rb +218 -0
  208. data/lib/fastly/models/inline_response20017.rb +227 -0
  209. data/lib/fastly/models/inline_response20018.rb +227 -0
  210. data/lib/fastly/models/inline_response20019.rb +228 -0
  211. data/lib/fastly/models/inline_response20020.rb +227 -0
  212. data/lib/fastly/models/inline_response20021.rb +227 -0
  213. data/lib/fastly/models/inline_response20022.rb +218 -0
  214. data/lib/fastly/models/inline_response2005.rb +2 -2
  215. data/lib/fastly/models/inline_response2006.rb +2 -12
  216. data/lib/fastly/models/inline_response2007.rb +2 -4
  217. data/lib/fastly/models/inline_response2008.rb +18 -8
  218. data/lib/fastly/models/inline_response2009.rb +17 -8
  219. data/lib/fastly/models/invitations_response.rb +1 -1
  220. data/lib/fastly/models/kv_store_response_body_enable.rb +243 -0
  221. data/lib/fastly/models/kv_store_response_customer.rb +216 -0
  222. data/lib/fastly/models/kv_store_response_links.rb +216 -0
  223. data/lib/fastly/models/kv_store_response_links_links.rb +217 -0
  224. data/lib/fastly/models/kv_store_response_product.rb +216 -0
  225. data/lib/fastly/models/kv_store_response_product_product.rb +227 -0
  226. data/lib/fastly/models/logging_azureblob_response.rb +3 -3
  227. data/lib/fastly/models/logging_cloudfiles_response.rb +3 -3
  228. data/lib/fastly/models/logging_digitalocean_response.rb +3 -3
  229. data/lib/fastly/models/logging_ftp_response.rb +3 -3
  230. data/lib/fastly/models/logging_gcs_response.rb +3 -3
  231. data/lib/fastly/models/logging_generic_common.rb +3 -3
  232. data/lib/fastly/models/logging_generic_common_response.rb +3 -3
  233. data/lib/fastly/models/logging_generic_common_response_all_of.rb +3 -3
  234. data/lib/fastly/models/logging_https_additional.rb +1 -1
  235. data/lib/fastly/models/logging_https_response.rb +1 -1
  236. data/lib/fastly/models/logging_message_type.rb +1 -1
  237. data/lib/fastly/models/logging_openstack_response.rb +3 -3
  238. data/lib/fastly/models/logging_s3_response.rb +3 -3
  239. data/lib/fastly/models/logging_sftp_response.rb +3 -3
  240. data/lib/fastly/models/logging_sumologic_additional.rb +1 -1
  241. data/lib/fastly/models/logging_sumologic_response.rb +1 -1
  242. data/lib/fastly/models/logging_syslog_additional.rb +1 -1
  243. data/lib/fastly/models/logging_syslog_response.rb +1 -1
  244. data/lib/fastly/models/mutual_authentications_response.rb +1 -1
  245. data/lib/fastly/models/notification.rb +270 -0
  246. data/lib/fastly/models/notification_config.rb +218 -0
  247. data/lib/fastly/models/page.rb +289 -0
  248. data/lib/fastly/models/page_create.rb +266 -0
  249. data/lib/fastly/models/page_update.rb +256 -0
  250. data/lib/fastly/models/pagination.rb +1 -1
  251. data/lib/fastly/models/pagination_meta.rb +30 -55
  252. data/lib/fastly/models/pagination_meta1.rb +273 -0
  253. data/lib/fastly/models/path_change.rb +274 -0
  254. data/lib/fastly/models/path_create.rb +242 -0
  255. data/lib/fastly/models/path_response.rb +285 -0
  256. data/lib/fastly/models/path_response_all_of.rb +254 -0
  257. data/lib/fastly/models/path_update.rb +233 -0
  258. data/lib/fastly/models/path_with_rules.rb +228 -0
  259. data/lib/fastly/models/paths_response.rb +228 -0
  260. data/lib/fastly/models/policy.rb +315 -0
  261. data/lib/fastly/models/policy_create.rb +289 -0
  262. data/lib/fastly/models/policy_update.rb +279 -0
  263. data/lib/fastly/models/position.rb +228 -0
  264. data/lib/fastly/models/realtime_entry.rb +2 -5
  265. data/lib/fastly/models/realtime_entry_aggregated.rb +344 -34
  266. data/lib/fastly/models/realtime_entry_datacenter.rb +3577 -0
  267. data/lib/fastly/models/realtime_measurements.rb +344 -34
  268. data/lib/fastly/models/report.rb +261 -0
  269. data/lib/fastly/models/request_body_for_create.rb +12 -1
  270. data/lib/fastly/models/request_body_for_update.rb +12 -1
  271. data/lib/fastly/models/results.rb +341 -31
  272. data/lib/fastly/models/routing_config.rb +251 -0
  273. data/lib/fastly/models/routing_config_condition.rb +261 -0
  274. data/lib/fastly/models/routing_config_response.rb +305 -0
  275. data/lib/fastly/models/routing_config_response_all_of.rb +274 -0
  276. data/lib/fastly/models/routing_config_state.rb +36 -0
  277. data/lib/fastly/models/routing_config_version_response.rb +250 -0
  278. data/lib/fastly/models/routing_configs_response.rb +228 -0
  279. data/lib/fastly/models/rule_change.rb +236 -0
  280. data/lib/fastly/models/rule_create.rb +267 -0
  281. data/lib/fastly/models/rule_response.rb +279 -0
  282. data/lib/fastly/models/rule_response_all_of.rb +248 -0
  283. data/lib/fastly/models/rule_update.rb +252 -0
  284. data/lib/fastly/models/rules_response.rb +228 -0
  285. data/lib/fastly/models/script.rb +350 -0
  286. data/lib/fastly/models/script_update.rb +271 -0
  287. data/lib/fastly/models/security_header.rb +234 -0
  288. data/lib/fastly/models/service_authorizations_response.rb +1 -1
  289. data/lib/fastly/models/successful_response_as_object.rb +12 -1
  290. data/lib/fastly/models/successful_response_as_object_all_of.rb +12 -1
  291. data/lib/fastly/models/tls_activations_response.rb +1 -1
  292. data/lib/fastly/models/tls_bulk_certificates_response.rb +1 -1
  293. data/lib/fastly/models/tls_certificates_response.rb +1 -1
  294. data/lib/fastly/models/tls_configurations_response.rb +1 -1
  295. data/lib/fastly/models/tls_domains_response.rb +1 -1
  296. data/lib/fastly/models/tls_private_keys_response.rb +1 -1
  297. data/lib/fastly/models/tls_subscriptions_response.rb +1 -1
  298. data/lib/fastly/models/versions_response.rb +228 -0
  299. data/lib/fastly/models/waf_simulate_request.rb +233 -0
  300. data/lib/fastly/models/waf_simulate_response.rb +240 -0
  301. data/lib/fastly/models/waf_simulate_signal.rb +344 -0
  302. data/lib/fastly/models/website.rb +257 -0
  303. data/lib/fastly/models/website_create.rb +222 -0
  304. data/lib/fastly/models/website_update.rb +217 -0
  305. data/lib/fastly/version.rb +1 -1
  306. data/lib/fastly.rb +77 -0
  307. data/sig.json +1 -1
  308. metadata +156 -2
@@ -0,0 +1,271 @@
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 ScriptUpdate
16
+ # Script authorization status
17
+ attr_accessor :authorization_status
18
+
19
+ # Reason for authorization decision
20
+ attr_accessor :justification
21
+
22
+ # Hash of authorized script content
23
+ attr_accessor :authorized_hash
24
+
25
+ class EnumAttributeValidator
26
+ attr_reader :datatype
27
+ attr_reader :allowable_values
28
+
29
+ def initialize(datatype, allowable_values)
30
+ @allowable_values = allowable_values.map do |value|
31
+ case datatype.to_s
32
+ when /Integer/i
33
+ value.to_i
34
+ when /Float/i
35
+ value.to_f
36
+ else
37
+ value
38
+ end
39
+ end
40
+ end
41
+
42
+ def valid?(value)
43
+ !value || allowable_values.include?(value)
44
+ end
45
+ end
46
+
47
+ # Attribute mapping from ruby-style variable name to JSON key.
48
+ def self.attribute_map
49
+ {
50
+ :'authorization_status' => :'authorization_status',
51
+ :'justification' => :'justification',
52
+ :'authorized_hash' => :'authorized_hash'
53
+ }
54
+ end
55
+
56
+ # Returns all the JSON keys this model knows about
57
+ def self.acceptable_attributes
58
+ attribute_map.values
59
+ end
60
+
61
+ # Attribute type mapping.
62
+ def self.fastly_types
63
+ {
64
+ :'authorization_status' => :'String',
65
+ :'justification' => :'String',
66
+ :'authorized_hash' => :'String'
67
+ }
68
+ end
69
+
70
+ # List of attributes with nullable: true
71
+ def self.fastly_nullable
72
+ Set.new([
73
+ ])
74
+ end
75
+
76
+ # Initializes the object
77
+ # @param [Hash] attributes Model attributes in the form of hash
78
+ def initialize(attributes = {})
79
+ if (!attributes.is_a?(Hash))
80
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ScriptUpdate` initialize method"
81
+ end
82
+
83
+ # check to see if the attribute exists and convert string to symbol for hash key
84
+ attributes = attributes.each_with_object({}) { |(k, v), h|
85
+ if (!self.class.attribute_map.key?(k.to_sym))
86
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ScriptUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
87
+ end
88
+ h[k.to_sym] = v
89
+ }
90
+
91
+ if attributes.key?(:'authorization_status')
92
+ self.authorization_status = attributes[:'authorization_status']
93
+ end
94
+
95
+ if attributes.key?(:'justification')
96
+ self.justification = attributes[:'justification']
97
+ end
98
+
99
+ if attributes.key?(:'authorized_hash')
100
+ self.authorized_hash = attributes[:'authorized_hash']
101
+ end
102
+ end
103
+
104
+ # Show invalid properties with the reasons. Usually used together with valid?
105
+ # @return Array for valid properties with the reasons
106
+ def list_invalid_properties
107
+ invalid_properties = Array.new
108
+ invalid_properties
109
+ end
110
+
111
+ # Check to see if the all the properties in the model are valid
112
+ # @return true if the model is valid
113
+ def valid?
114
+ authorization_status_validator = EnumAttributeValidator.new('String', ["authorized", "unauthorized"])
115
+ return false unless authorization_status_validator.valid?(@authorization_status)
116
+ true
117
+ end
118
+
119
+ # Custom attribute writer method checking allowed values (enum).
120
+ # @param [Object] authorization_status Object to be assigned
121
+ def authorization_status=(authorization_status)
122
+ validator = EnumAttributeValidator.new('String', ["authorized", "unauthorized"])
123
+ unless validator.valid?(authorization_status)
124
+ fail ArgumentError, "invalid value for \"authorization_status\", must be one of #{validator.allowable_values}."
125
+ end
126
+ @authorization_status = authorization_status
127
+ end
128
+
129
+ # Checks equality by comparing each attribute.
130
+ # @param [Object] Object to be compared
131
+ def ==(o)
132
+ return true if self.equal?(o)
133
+ self.class == o.class &&
134
+ authorization_status == o.authorization_status &&
135
+ justification == o.justification &&
136
+ authorized_hash == o.authorized_hash
137
+ end
138
+
139
+ # @see the `==` method
140
+ # @param [Object] Object to be compared
141
+ def eql?(o)
142
+ self == o
143
+ end
144
+
145
+ # Calculates hash code according to all attributes.
146
+ # @return [Integer] Hash code
147
+ def hash
148
+ [authorization_status, justification, authorized_hash].hash
149
+ end
150
+
151
+ # Builds the object from hash
152
+ # @param [Hash] attributes Model attributes in the form of hash
153
+ # @return [Object] Returns the model itself
154
+ def self.build_from_hash(attributes)
155
+ new.build_from_hash(attributes)
156
+ end
157
+
158
+ # Builds the object from hash
159
+ # @param [Hash] attributes Model attributes in the form of hash
160
+ # @return [Object] Returns the model itself
161
+ def build_from_hash(attributes)
162
+ return nil unless attributes.is_a?(Hash)
163
+ self.class.fastly_types.each_pair do |key, type|
164
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
165
+ self.send("#{key}=", nil)
166
+ elsif type =~ /\AArray<(.*)>/i
167
+ # check to ensure the input is an array given that the attribute
168
+ # is documented as an array but the input is not
169
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
170
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
171
+ end
172
+ elsif !attributes[self.class.attribute_map[key]].nil?
173
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
174
+ end
175
+ end
176
+
177
+ self
178
+ end
179
+
180
+ # Deserializes the data based on type
181
+ # @param string type Data type
182
+ # @param string value Value to be deserialized
183
+ # @return [Object] Deserialized data
184
+ def _deserialize(type, value)
185
+ case type.to_sym
186
+ when :Time
187
+ Time.parse(value)
188
+ when :Date
189
+ Date.parse(value)
190
+ when :String
191
+ value.to_s
192
+ when :Integer
193
+ value.to_i
194
+ when :Float
195
+ value.to_f
196
+ when :Boolean
197
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
198
+ true
199
+ else
200
+ false
201
+ end
202
+ when :Object
203
+ # generic object (usually a Hash), return directly
204
+ value
205
+ when /\AArray<(?<inner_type>.+)>\z/
206
+ inner_type = Regexp.last_match[:inner_type]
207
+ value.map { |v| _deserialize(inner_type, v) }
208
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
209
+ k_type = Regexp.last_match[:k_type]
210
+ v_type = Regexp.last_match[:v_type]
211
+ {}.tap do |hash|
212
+ value.each do |k, v|
213
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
214
+ end
215
+ end
216
+ else # model
217
+ # models (e.g. Pet) or oneOf
218
+ klass = Fastly.const_get(type)
219
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
220
+ end
221
+ end
222
+
223
+ # Returns the string representation of the object
224
+ # @return [String] String presentation of the object
225
+ def to_s
226
+ to_hash.to_s
227
+ end
228
+
229
+ # to_body is an alias to to_hash (backward compatibility)
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_body
232
+ to_hash
233
+ end
234
+
235
+ # Returns the object in the form of hash
236
+ # @return [Hash] Returns the object in the form of hash
237
+ def to_hash
238
+ hash = {}
239
+ self.class.attribute_map.each_pair do |attr, param|
240
+ value = self.send(attr)
241
+ if value.nil?
242
+ is_nullable = self.class.fastly_nullable.include?(attr)
243
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
244
+ end
245
+
246
+ hash[param] = _to_hash(value)
247
+ end
248
+ hash
249
+ end
250
+
251
+ # Outputs non-array value in the form of hash
252
+ # For object, use to_hash. Otherwise, just return the value
253
+ # @param [Object] value Any valid value
254
+ # @return [Hash] Returns the value in the form of hash
255
+ def _to_hash(value)
256
+ if value.is_a?(Array)
257
+ value.compact.map { |v| _to_hash(v) }
258
+ elsif value.is_a?(Hash)
259
+ {}.tap do |hash|
260
+ value.each { |k, v| hash[k] = _to_hash(v) }
261
+ end
262
+ elsif value.respond_to? :to_hash
263
+ value.to_hash
264
+ else
265
+ value
266
+ end
267
+ end
268
+
269
+ end
270
+
271
+ end
@@ -0,0 +1,234 @@
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 SecurityHeader
16
+ attr_accessor :name
17
+
18
+ attr_accessor :value
19
+
20
+ attr_accessor :observed_at
21
+
22
+ # Attribute mapping from ruby-style variable name to JSON key.
23
+ def self.attribute_map
24
+ {
25
+ :'name' => :'name',
26
+ :'value' => :'value',
27
+ :'observed_at' => :'observed_at'
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
+ :'name' => :'String',
40
+ :'value' => :'String',
41
+ :'observed_at' => :'Time'
42
+ }
43
+ end
44
+
45
+ # List of attributes with nullable: true
46
+ def self.fastly_nullable
47
+ Set.new([
48
+ ])
49
+ end
50
+
51
+ # Initializes the object
52
+ # @param [Hash] attributes Model attributes in the form of hash
53
+ def initialize(attributes = {})
54
+ if (!attributes.is_a?(Hash))
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::SecurityHeader` initialize method"
56
+ end
57
+
58
+ # check to see if the attribute exists and convert string to symbol for hash key
59
+ attributes = attributes.each_with_object({}) { |(k, v), h|
60
+ if (!self.class.attribute_map.key?(k.to_sym))
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::SecurityHeader`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
+ end
63
+ h[k.to_sym] = v
64
+ }
65
+
66
+ if attributes.key?(:'name')
67
+ self.name = attributes[:'name']
68
+ end
69
+
70
+ if attributes.key?(:'value')
71
+ self.value = attributes[:'value']
72
+ end
73
+
74
+ if attributes.key?(:'observed_at')
75
+ self.observed_at = attributes[:'observed_at']
76
+ end
77
+ end
78
+
79
+ # Show invalid properties with the reasons. Usually used together with valid?
80
+ # @return Array for valid properties with the reasons
81
+ def list_invalid_properties
82
+ invalid_properties = Array.new
83
+ invalid_properties
84
+ end
85
+
86
+ # Check to see if the all the properties in the model are valid
87
+ # @return true if the model is valid
88
+ def valid?
89
+ true
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] Object to be compared
94
+ def ==(o)
95
+ return true if self.equal?(o)
96
+ self.class == o.class &&
97
+ name == o.name &&
98
+ value == o.value &&
99
+ observed_at == o.observed_at
100
+ end
101
+
102
+ # @see the `==` method
103
+ # @param [Object] Object to be compared
104
+ def eql?(o)
105
+ self == o
106
+ end
107
+
108
+ # Calculates hash code according to all attributes.
109
+ # @return [Integer] Hash code
110
+ def hash
111
+ [name, value, observed_at].hash
112
+ end
113
+
114
+ # Builds the object from hash
115
+ # @param [Hash] attributes Model attributes in the form of hash
116
+ # @return [Object] Returns the model itself
117
+ def self.build_from_hash(attributes)
118
+ new.build_from_hash(attributes)
119
+ end
120
+
121
+ # Builds the object from hash
122
+ # @param [Hash] attributes Model attributes in the form of hash
123
+ # @return [Object] Returns the model itself
124
+ def build_from_hash(attributes)
125
+ return nil unless attributes.is_a?(Hash)
126
+ self.class.fastly_types.each_pair do |key, type|
127
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
128
+ self.send("#{key}=", nil)
129
+ elsif type =~ /\AArray<(.*)>/i
130
+ # check to ensure the input is an array given that the attribute
131
+ # is documented as an array but the input is not
132
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
133
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
134
+ end
135
+ elsif !attributes[self.class.attribute_map[key]].nil?
136
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
137
+ end
138
+ end
139
+
140
+ self
141
+ end
142
+
143
+ # Deserializes the data based on type
144
+ # @param string type Data type
145
+ # @param string value Value to be deserialized
146
+ # @return [Object] Deserialized data
147
+ def _deserialize(type, value)
148
+ case type.to_sym
149
+ when :Time
150
+ Time.parse(value)
151
+ when :Date
152
+ Date.parse(value)
153
+ when :String
154
+ value.to_s
155
+ when :Integer
156
+ value.to_i
157
+ when :Float
158
+ value.to_f
159
+ when :Boolean
160
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
161
+ true
162
+ else
163
+ false
164
+ end
165
+ when :Object
166
+ # generic object (usually a Hash), return directly
167
+ value
168
+ when /\AArray<(?<inner_type>.+)>\z/
169
+ inner_type = Regexp.last_match[:inner_type]
170
+ value.map { |v| _deserialize(inner_type, v) }
171
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
172
+ k_type = Regexp.last_match[:k_type]
173
+ v_type = Regexp.last_match[:v_type]
174
+ {}.tap do |hash|
175
+ value.each do |k, v|
176
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
177
+ end
178
+ end
179
+ else # model
180
+ # models (e.g. Pet) or oneOf
181
+ klass = Fastly.const_get(type)
182
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
183
+ end
184
+ end
185
+
186
+ # Returns the string representation of the object
187
+ # @return [String] String presentation of the object
188
+ def to_s
189
+ to_hash.to_s
190
+ end
191
+
192
+ # to_body is an alias to to_hash (backward compatibility)
193
+ # @return [Hash] Returns the object in the form of hash
194
+ def to_body
195
+ to_hash
196
+ end
197
+
198
+ # Returns the object in the form of hash
199
+ # @return [Hash] Returns the object in the form of hash
200
+ def to_hash
201
+ hash = {}
202
+ self.class.attribute_map.each_pair do |attr, param|
203
+ value = self.send(attr)
204
+ if value.nil?
205
+ is_nullable = self.class.fastly_nullable.include?(attr)
206
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
207
+ end
208
+
209
+ hash[param] = _to_hash(value)
210
+ end
211
+ hash
212
+ end
213
+
214
+ # Outputs non-array value in the form of hash
215
+ # For object, use to_hash. Otherwise, just return the value
216
+ # @param [Object] value Any valid value
217
+ # @return [Hash] Returns the value in the form of hash
218
+ def _to_hash(value)
219
+ if value.is_a?(Array)
220
+ value.compact.map { |v| _to_hash(v) }
221
+ elsif value.is_a?(Hash)
222
+ {}.tap do |hash|
223
+ value.each { |k, v| hash[k] = _to_hash(v) }
224
+ end
225
+ elsif value.respond_to? :to_hash
226
+ value.to_hash
227
+ else
228
+ value
229
+ end
230
+ end
231
+
232
+ end
233
+
234
+ end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<ServiceAuthorizationResponseData>'
42
42
  }
43
43
  end
@@ -29,6 +29,9 @@ module Fastly
29
29
  # The `service_id` associated with your domain or `null` if there is no association.
30
30
  attr_accessor :service_id
31
31
 
32
+ # The `routing_configuration_id` associated with your domain or `null` if there is no association.
33
+ attr_accessor :routing_configuration_id
34
+
32
35
  # A freeform descriptive note.
33
36
  attr_accessor :description
34
37
 
@@ -46,6 +49,7 @@ module Fastly
46
49
  :'id' => :'id',
47
50
  :'fqdn' => :'fqdn',
48
51
  :'service_id' => :'service_id',
52
+ :'routing_configuration_id' => :'routing_configuration_id',
49
53
  :'description' => :'description',
50
54
  :'activated' => :'activated',
51
55
  :'verified' => :'verified'
@@ -65,6 +69,7 @@ module Fastly
65
69
  :'id' => :'String',
66
70
  :'fqdn' => :'String',
67
71
  :'service_id' => :'String',
72
+ :'routing_configuration_id' => :'String',
68
73
  :'description' => :'String',
69
74
  :'activated' => :'Boolean',
70
75
  :'verified' => :'Boolean'
@@ -77,6 +82,7 @@ module Fastly
77
82
  :'created_at',
78
83
  :'updated_at',
79
84
  :'service_id',
85
+ :'routing_configuration_id',
80
86
  ])
81
87
  end
82
88
 
@@ -123,6 +129,10 @@ module Fastly
123
129
  self.service_id = attributes[:'service_id']
124
130
  end
125
131
 
132
+ if attributes.key?(:'routing_configuration_id')
133
+ self.routing_configuration_id = attributes[:'routing_configuration_id']
134
+ end
135
+
126
136
  if attributes.key?(:'description')
127
137
  self.description = attributes[:'description']
128
138
  end
@@ -159,6 +169,7 @@ module Fastly
159
169
  id == o.id &&
160
170
  fqdn == o.fqdn &&
161
171
  service_id == o.service_id &&
172
+ routing_configuration_id == o.routing_configuration_id &&
162
173
  description == o.description &&
163
174
  activated == o.activated &&
164
175
  verified == o.verified
@@ -173,7 +184,7 @@ module Fastly
173
184
  # Calculates hash code according to all attributes.
174
185
  # @return [Integer] Hash code
175
186
  def hash
176
- [created_at, updated_at, id, fqdn, service_id, description, activated, verified].hash
187
+ [created_at, updated_at, id, fqdn, service_id, routing_configuration_id, description, activated, verified].hash
177
188
  end
178
189
 
179
190
  # Builds the object from hash
@@ -22,6 +22,9 @@ module Fastly
22
22
  # The `service_id` associated with your domain or `null` if there is no association.
23
23
  attr_accessor :service_id
24
24
 
25
+ # The `routing_configuration_id` associated with your domain or `null` if there is no association.
26
+ attr_accessor :routing_configuration_id
27
+
25
28
  # A freeform descriptive note.
26
29
  attr_accessor :description
27
30
 
@@ -37,6 +40,7 @@ module Fastly
37
40
  :'id' => :'id',
38
41
  :'fqdn' => :'fqdn',
39
42
  :'service_id' => :'service_id',
43
+ :'routing_configuration_id' => :'routing_configuration_id',
40
44
  :'description' => :'description',
41
45
  :'activated' => :'activated',
42
46
  :'verified' => :'verified'
@@ -54,6 +58,7 @@ module Fastly
54
58
  :'id' => :'String',
55
59
  :'fqdn' => :'String',
56
60
  :'service_id' => :'String',
61
+ :'routing_configuration_id' => :'String',
57
62
  :'description' => :'String',
58
63
  :'activated' => :'Boolean',
59
64
  :'verified' => :'Boolean'
@@ -64,6 +69,7 @@ module Fastly
64
69
  def self.fastly_nullable
65
70
  Set.new([
66
71
  :'service_id',
72
+ :'routing_configuration_id',
67
73
  ])
68
74
  end
69
75
 
@@ -94,6 +100,10 @@ module Fastly
94
100
  self.service_id = attributes[:'service_id']
95
101
  end
96
102
 
103
+ if attributes.key?(:'routing_configuration_id')
104
+ self.routing_configuration_id = attributes[:'routing_configuration_id']
105
+ end
106
+
97
107
  if attributes.key?(:'description')
98
108
  self.description = attributes[:'description']
99
109
  end
@@ -128,6 +138,7 @@ module Fastly
128
138
  id == o.id &&
129
139
  fqdn == o.fqdn &&
130
140
  service_id == o.service_id &&
141
+ routing_configuration_id == o.routing_configuration_id &&
131
142
  description == o.description &&
132
143
  activated == o.activated &&
133
144
  verified == o.verified
@@ -142,7 +153,7 @@ module Fastly
142
153
  # Calculates hash code according to all attributes.
143
154
  # @return [Integer] Hash code
144
155
  def hash
145
- [id, fqdn, service_id, description, activated, verified].hash
156
+ [id, fqdn, service_id, routing_configuration_id, description, activated, verified].hash
146
157
  end
147
158
 
148
159
  # Builds the object from hash
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsActivationResponseData>'
42
42
  }
43
43
  end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsBulkCertificateResponseData>'
42
42
  }
43
43
  end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsCertificateResponseData>'
42
42
  }
43
43
  end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsConfigurationResponseData>'
42
42
  }
43
43
  end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsDomainData>'
42
42
  }
43
43
  end
@@ -37,7 +37,7 @@ module Fastly
37
37
  def self.fastly_types
38
38
  {
39
39
  :'links' => :'PaginationLinks',
40
- :'meta' => :'PaginationMeta',
40
+ :'meta' => :'PaginationMeta1',
41
41
  :'data' => :'Array<TlsPrivateKeyResponseData>'
42
42
  }
43
43
  end