fastly 13.0.0 → 14.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +43 -0
  3. data/Gemfile.lock +4 -4
  4. data/README.md +21 -6
  5. data/docs/AttackReport.md +19 -0
  6. data/docs/AttackSignal.md +12 -0
  7. data/docs/AttackSource.md +13 -0
  8. data/docs/Backend.md +6 -6
  9. data/docs/BackendApi.md +18 -18
  10. data/docs/BackendResponse.md +6 -6
  11. data/docs/DdosProtectionApi.md +40 -0
  12. data/docs/DdosProtectionAttributeStats.md +1 -1
  13. data/docs/DdosProtectionInvalidRequest.md +13 -0
  14. data/docs/DdosProtectionNotAuthorized.md +11 -0
  15. data/docs/DdosProtectionRule.md +1 -1
  16. data/docs/DdosProtectionRuleAllOf.md +1 -1
  17. data/docs/DdosProtectionRulePatch.md +10 -0
  18. data/docs/HistoricalApi.md +2 -0
  19. data/docs/Invitation.md +1 -1
  20. data/docs/InvitationCreateData.md +12 -0
  21. data/docs/InvitationCreateDataAllOf.md +10 -0
  22. data/docs/{InvitationResponse.md → InvitationCreateResponse.md} +1 -1
  23. data/docs/{InvitationResponseAllOf.md → InvitationCreateResponseAllOf.md} +1 -1
  24. data/docs/InvitationData.md +0 -1
  25. data/docs/InvitationResponseData.md +1 -1
  26. data/docs/InvitationsApi.md +2 -2
  27. data/docs/KvStoreApi.md +2 -0
  28. data/docs/ListAttackReport.md +11 -0
  29. data/docs/{DdosProtectionTrafficAttribute.md → ListAttackReportMeta.md} +2 -1
  30. data/docs/{DdosProtectionAction.md → ListSignalReport.md} +2 -1
  31. data/docs/LogExplorerApi.md +1 -1
  32. data/docs/LoggingAzureblobApi.md +8 -4
  33. data/docs/LoggingAzureblobResponse.md +2 -1
  34. data/docs/LoggingBigqueryAdditional.md +1 -1
  35. data/docs/LoggingBigqueryApi.md +8 -4
  36. data/docs/LoggingBigqueryResponse.md +2 -1
  37. data/docs/LoggingCloudfilesApi.md +8 -4
  38. data/docs/LoggingCloudfilesResponse.md +2 -1
  39. data/docs/LoggingCommon.md +2 -1
  40. data/docs/LoggingCommonResponse.md +2 -1
  41. data/docs/LoggingCommonResponseAllOf.md +2 -1
  42. data/docs/LoggingDatadogAdditional.md +1 -1
  43. data/docs/LoggingDatadogApi.md +8 -4
  44. data/docs/LoggingDatadogResponse.md +2 -1
  45. data/docs/LoggingDigitaloceanApi.md +8 -4
  46. data/docs/LoggingDigitaloceanResponse.md +2 -1
  47. data/docs/LoggingElasticsearchAdditional.md +1 -1
  48. data/docs/LoggingElasticsearchApi.md +8 -4
  49. data/docs/LoggingElasticsearchResponse.md +2 -1
  50. data/docs/LoggingFtpApi.md +8 -4
  51. data/docs/LoggingFtpResponse.md +2 -1
  52. data/docs/LoggingGcsApi.md +8 -4
  53. data/docs/LoggingGcsResponse.md +2 -1
  54. data/docs/LoggingGooglePubsubAdditional.md +1 -1
  55. data/docs/LoggingGooglePubsubResponse.md +2 -1
  56. data/docs/LoggingGrafanacloudlogsAdditional.md +1 -1
  57. data/docs/LoggingGrafanacloudlogsApi.md +8 -4
  58. data/docs/LoggingGrafanacloudlogsResponse.md +2 -1
  59. data/docs/LoggingHerokuApi.md +8 -4
  60. data/docs/LoggingHerokuResponse.md +2 -1
  61. data/docs/LoggingHoneycombAdditional.md +1 -1
  62. data/docs/LoggingHoneycombApi.md +8 -4
  63. data/docs/LoggingHoneycombResponse.md +2 -1
  64. data/docs/LoggingHttpsAdditional.md +1 -1
  65. data/docs/LoggingHttpsApi.md +8 -4
  66. data/docs/LoggingHttpsResponse.md +2 -1
  67. data/docs/LoggingKafkaApi.md +4 -2
  68. data/docs/LoggingKafkaResponse.md +2 -1
  69. data/docs/LoggingKafkaResponsePost.md +2 -1
  70. data/docs/LoggingKinesisAdditional.md +1 -1
  71. data/docs/LoggingKinesisApi.md +2 -2
  72. data/docs/LoggingKinesisResponse.md +1 -1
  73. data/docs/LoggingLogentriesApi.md +8 -4
  74. data/docs/LoggingLogentriesResponse.md +2 -1
  75. data/docs/LoggingLogglyApi.md +8 -4
  76. data/docs/LoggingLogglyResponse.md +2 -1
  77. data/docs/LoggingLogshuttleApi.md +8 -4
  78. data/docs/LoggingLogshuttleResponse.md +2 -1
  79. data/docs/LoggingNewrelicAdditional.md +1 -1
  80. data/docs/LoggingNewrelicApi.md +8 -4
  81. data/docs/LoggingNewrelicResponse.md +2 -1
  82. data/docs/LoggingNewrelicotlpAdditional.md +1 -1
  83. data/docs/LoggingNewrelicotlpApi.md +8 -4
  84. data/docs/LoggingNewrelicotlpResponse.md +2 -1
  85. data/docs/LoggingOpenstackApi.md +8 -4
  86. data/docs/LoggingOpenstackResponse.md +2 -1
  87. data/docs/LoggingPapertrailApi.md +8 -4
  88. data/docs/LoggingPapertrailResponse.md +2 -1
  89. data/docs/LoggingPubsubApi.md +8 -4
  90. data/docs/LoggingS3Api.md +8 -4
  91. data/docs/LoggingS3Response.md +2 -1
  92. data/docs/LoggingScalyrApi.md +8 -4
  93. data/docs/LoggingScalyrResponse.md +2 -1
  94. data/docs/LoggingSftpApi.md +8 -4
  95. data/docs/LoggingSftpResponse.md +2 -1
  96. data/docs/LoggingSplunkApi.md +8 -4
  97. data/docs/LoggingSplunkResponse.md +2 -1
  98. data/docs/LoggingSumologicApi.md +8 -4
  99. data/docs/LoggingSumologicResponse.md +2 -1
  100. data/docs/LoggingSyslogApi.md +8 -4
  101. data/docs/LoggingSyslogResponse.md +2 -1
  102. data/docs/NgwafReportsApi.md +99 -0
  103. data/docs/ObservabilityTimeseriesApi.md +67 -0
  104. data/docs/PoolAdditional.md +1 -1
  105. data/docs/PoolApi.md +8 -8
  106. data/docs/PoolResponse.md +2 -2
  107. data/docs/PoolResponseCommon.md +1 -1
  108. data/docs/PoolResponsePost.md +2 -2
  109. data/docs/PurgeApi.md +1 -1
  110. data/docs/SignalReport.md +13 -0
  111. data/docs/TimeseriesGetResponse.md +11 -0
  112. data/docs/TimeseriesMeta.md +13 -0
  113. data/docs/TimeseriesResult.md +11 -0
  114. data/docs/TlsCertificateDataAttributes.md +1 -0
  115. data/docs/TlsCsrData.md +0 -1
  116. data/docs/TlsCsrDataAttributes.md +1 -0
  117. data/docs/TlsSubscriptionsApi.md +0 -2
  118. data/docs/TopWorkspace.md +12 -0
  119. data/lib/fastly/api/backend_api.rb +24 -24
  120. data/lib/fastly/api/ddos_protection_api.rb +70 -0
  121. data/lib/fastly/api/historical_api.rb +3 -0
  122. data/lib/fastly/api/invitations_api.rb +3 -3
  123. data/lib/fastly/api/kv_store_api.rb +3 -0
  124. data/lib/fastly/api/logging_azureblob_api.rb +18 -4
  125. data/lib/fastly/api/logging_bigquery_api.rb +18 -4
  126. data/lib/fastly/api/logging_cloudfiles_api.rb +18 -4
  127. data/lib/fastly/api/logging_datadog_api.rb +18 -4
  128. data/lib/fastly/api/logging_digitalocean_api.rb +18 -4
  129. data/lib/fastly/api/logging_elasticsearch_api.rb +18 -4
  130. data/lib/fastly/api/logging_ftp_api.rb +18 -4
  131. data/lib/fastly/api/logging_gcs_api.rb +18 -4
  132. data/lib/fastly/api/logging_grafanacloudlogs_api.rb +18 -4
  133. data/lib/fastly/api/logging_heroku_api.rb +18 -4
  134. data/lib/fastly/api/logging_honeycomb_api.rb +18 -4
  135. data/lib/fastly/api/logging_https_api.rb +18 -4
  136. data/lib/fastly/api/logging_kafka_api.rb +9 -2
  137. data/lib/fastly/api/logging_kinesis_api.rb +2 -2
  138. data/lib/fastly/api/logging_logentries_api.rb +18 -4
  139. data/lib/fastly/api/logging_loggly_api.rb +18 -4
  140. data/lib/fastly/api/logging_logshuttle_api.rb +18 -4
  141. data/lib/fastly/api/logging_newrelic_api.rb +18 -4
  142. data/lib/fastly/api/logging_newrelicotlp_api.rb +18 -4
  143. data/lib/fastly/api/logging_openstack_api.rb +18 -4
  144. data/lib/fastly/api/logging_papertrail_api.rb +18 -4
  145. data/lib/fastly/api/logging_pubsub_api.rb +18 -4
  146. data/lib/fastly/api/logging_s3_api.rb +18 -4
  147. data/lib/fastly/api/logging_scalyr_api.rb +18 -4
  148. data/lib/fastly/api/logging_sftp_api.rb +18 -4
  149. data/lib/fastly/api/logging_splunk_api.rb +18 -4
  150. data/lib/fastly/api/logging_sumologic_api.rb +18 -4
  151. data/lib/fastly/api/logging_syslog_api.rb +18 -4
  152. data/lib/fastly/api/ngwaf_reports_api.rb +161 -0
  153. data/lib/fastly/api/{observability_timeseries_for_logs_api.rb → observability_timeseries_api.rb} +38 -43
  154. data/lib/fastly/api/pool_api.rb +8 -8
  155. data/lib/fastly/api/purge_api.rb +2 -2
  156. data/lib/fastly/api/tls_subscriptions_api.rb +0 -3
  157. data/lib/fastly/configuration.rb +19 -1
  158. data/lib/fastly/models/attack_report.rb +359 -0
  159. data/lib/fastly/models/attack_signal.rb +252 -0
  160. data/lib/fastly/models/attack_source.rb +267 -0
  161. data/lib/fastly/models/backend.rb +9 -4
  162. data/lib/fastly/models/backend_response.rb +9 -4
  163. data/lib/fastly/models/ddos_protection_attribute_stats.rb +2 -1
  164. data/lib/fastly/models/ddos_protection_invalid_request.rb +309 -0
  165. data/lib/fastly/models/{log_timeseries_filter_field_item.rb → ddos_protection_not_authorized.rb} +24 -36
  166. data/lib/fastly/models/ddos_protection_rule.rb +2 -1
  167. data/lib/fastly/models/ddos_protection_rule_all_of.rb +2 -1
  168. data/lib/fastly/models/{log_timeseries_get_response_meta_filters.rb → ddos_protection_rule_patch.rb} +13 -14
  169. data/lib/fastly/models/invitation.rb +1 -1
  170. data/lib/fastly/models/invitation_create_data.rb +244 -0
  171. data/lib/fastly/models/invitation_create_data_all_of.rb +216 -0
  172. data/lib/fastly/models/{invitation_response.rb → invitation_create_response.rb} +4 -4
  173. data/lib/fastly/models/{invitation_response_all_of.rb → invitation_create_response_all_of.rb} +3 -3
  174. data/lib/fastly/models/invitation_data.rb +4 -13
  175. data/lib/fastly/models/invitation_response_data.rb +13 -13
  176. data/lib/fastly/models/{log_timeseries_get_response.rb → list_attack_report.rb} +5 -5
  177. data/lib/fastly/models/list_attack_report_meta.rb +218 -0
  178. data/lib/fastly/models/{log_timeseries_result_dimensions.rb → list_signal_report.rb} +12 -10
  179. data/lib/fastly/models/logging_azureblob_response.rb +26 -2
  180. data/lib/fastly/models/logging_bigquery_additional.rb +1 -1
  181. data/lib/fastly/models/logging_bigquery_response.rb +26 -2
  182. data/lib/fastly/models/logging_cloudfiles_response.rb +26 -2
  183. data/lib/fastly/models/logging_common.rb +29 -5
  184. data/lib/fastly/models/logging_common_response.rb +26 -2
  185. data/lib/fastly/models/logging_common_response_all_of.rb +29 -5
  186. data/lib/fastly/models/logging_datadog_additional.rb +1 -1
  187. data/lib/fastly/models/logging_datadog_response.rb +26 -2
  188. data/lib/fastly/models/logging_digitalocean_response.rb +26 -2
  189. data/lib/fastly/models/logging_elasticsearch_additional.rb +1 -1
  190. data/lib/fastly/models/logging_elasticsearch_response.rb +26 -2
  191. data/lib/fastly/models/logging_ftp_response.rb +26 -2
  192. data/lib/fastly/models/logging_gcs_response.rb +26 -2
  193. data/lib/fastly/models/logging_google_pubsub_additional.rb +1 -1
  194. data/lib/fastly/models/logging_google_pubsub_response.rb +26 -2
  195. data/lib/fastly/models/logging_grafanacloudlogs_additional.rb +1 -1
  196. data/lib/fastly/models/logging_grafanacloudlogs_response.rb +26 -2
  197. data/lib/fastly/models/logging_heroku_response.rb +26 -2
  198. data/lib/fastly/models/logging_honeycomb_additional.rb +1 -1
  199. data/lib/fastly/models/logging_honeycomb_response.rb +26 -2
  200. data/lib/fastly/models/logging_https_additional.rb +1 -1
  201. data/lib/fastly/models/logging_https_response.rb +26 -2
  202. data/lib/fastly/models/logging_kafka_response.rb +26 -2
  203. data/lib/fastly/models/logging_kafka_response_post.rb +26 -2
  204. data/lib/fastly/models/logging_kinesis_additional.rb +1 -1
  205. data/lib/fastly/models/logging_kinesis_response.rb +1 -1
  206. data/lib/fastly/models/logging_logentries_response.rb +26 -2
  207. data/lib/fastly/models/logging_loggly_response.rb +26 -2
  208. data/lib/fastly/models/logging_logshuttle_response.rb +26 -2
  209. data/lib/fastly/models/logging_newrelic_additional.rb +1 -1
  210. data/lib/fastly/models/logging_newrelic_response.rb +26 -2
  211. data/lib/fastly/models/logging_newrelicotlp_additional.rb +1 -1
  212. data/lib/fastly/models/logging_newrelicotlp_response.rb +26 -2
  213. data/lib/fastly/models/logging_openstack_response.rb +26 -2
  214. data/lib/fastly/models/logging_papertrail_response.rb +26 -2
  215. data/lib/fastly/models/logging_s3_response.rb +26 -2
  216. data/lib/fastly/models/logging_scalyr_response.rb +26 -2
  217. data/lib/fastly/models/logging_sftp_response.rb +26 -2
  218. data/lib/fastly/models/logging_splunk_response.rb +26 -2
  219. data/lib/fastly/models/logging_sumologic_response.rb +26 -2
  220. data/lib/fastly/models/logging_syslog_response.rb +26 -2
  221. data/lib/fastly/models/pool_additional.rb +1 -1
  222. data/lib/fastly/models/pool_response.rb +2 -2
  223. data/lib/fastly/models/pool_response_common.rb +1 -1
  224. data/lib/fastly/models/pool_response_post.rb +2 -2
  225. data/lib/fastly/models/relationship_service_invitations.rb +1 -0
  226. data/lib/fastly/models/relationship_service_invitations_service_invitations.rb +1 -0
  227. data/lib/fastly/models/relationships_for_invitation.rb +1 -0
  228. data/lib/fastly/models/signal_report.rb +249 -0
  229. data/lib/fastly/models/timeseries_get_response.rb +227 -0
  230. data/lib/fastly/models/{log_timeseries_get_response_meta.rb → timeseries_meta.rb} +23 -32
  231. data/lib/fastly/models/{log_timeseries_result.rb → timeseries_result.rb} +9 -5
  232. data/lib/fastly/models/tls_certificate_data_attributes.rb +14 -4
  233. data/lib/fastly/models/tls_csr_data.rb +4 -13
  234. data/lib/fastly/models/tls_csr_data_attributes.rb +14 -4
  235. data/lib/fastly/models/top_workspace.rb +238 -0
  236. data/lib/fastly/version.rb +1 -1
  237. data/lib/fastly.rb +20 -12
  238. data/sig.json +1 -1
  239. metadata +42 -26
  240. data/docs/LogTimeseriesFilterFieldItem.md +0 -12
  241. data/docs/LogTimeseriesGetResponse.md +0 -11
  242. data/docs/LogTimeseriesGetResponseMeta.md +0 -14
  243. data/docs/LogTimeseriesGetResponseMetaFilters.md +0 -10
  244. data/docs/LogTimeseriesResult.md +0 -11
  245. data/docs/LogTimeseriesResultDimensions.md +0 -10
  246. data/docs/LogTimeseriesValueField.md +0 -59
  247. data/docs/ObservabilityTimeseriesForLogsApi.md +0 -67
  248. data/lib/fastly/models/ddos_protection_action.rb +0 -37
  249. data/lib/fastly/models/ddos_protection_traffic_attribute.rb +0 -40
  250. data/lib/fastly/models/log_timeseries_value_field.rb +0 -108
@@ -0,0 +1,216 @@
1
+ =begin
2
+ #Fastly API
3
+
4
+ #Via the Fastly API you can perform any of the operations that are possible within the management console, including creating services, domains, and backends, configuring rules or uploading your own application code, as well as account operations such as user administration and billing reports. The API is organized into collections of endpoints that allow manipulation of objects related to Fastly services and accounts. For the most accurate and up-to-date API reference content, visit our [Developer Hub](https://www.fastly.com/documentation/reference/api/)
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: oss@fastly.com
8
+
9
+ =end
10
+
11
+ require 'date'
12
+ require 'time'
13
+
14
+ module Fastly
15
+ class InvitationCreateDataAllOf
16
+ attr_accessor :relationships
17
+
18
+ # Attribute mapping from ruby-style variable name to JSON key.
19
+ def self.attribute_map
20
+ {
21
+ :'relationships' => :'relationships'
22
+ }
23
+ end
24
+
25
+ # Returns all the JSON keys this model knows about
26
+ def self.acceptable_attributes
27
+ attribute_map.values
28
+ end
29
+
30
+ # Attribute type mapping.
31
+ def self.fastly_types
32
+ {
33
+ :'relationships' => :'RelationshipServiceInvitationsCreate'
34
+ }
35
+ end
36
+
37
+ # List of attributes with nullable: true
38
+ def self.fastly_nullable
39
+ Set.new([
40
+ ])
41
+ end
42
+
43
+ # Initializes the object
44
+ # @param [Hash] attributes Model attributes in the form of hash
45
+ def initialize(attributes = {})
46
+ if (!attributes.is_a?(Hash))
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvitationCreateDataAllOf` initialize method"
48
+ end
49
+
50
+ # check to see if the attribute exists and convert string to symbol for hash key
51
+ attributes = attributes.each_with_object({}) { |(k, v), h|
52
+ if (!self.class.attribute_map.key?(k.to_sym))
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvitationCreateDataAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
+ end
55
+ h[k.to_sym] = v
56
+ }
57
+
58
+ if attributes.key?(:'relationships')
59
+ self.relationships = attributes[:'relationships']
60
+ end
61
+ end
62
+
63
+ # Show invalid properties with the reasons. Usually used together with valid?
64
+ # @return Array for valid properties with the reasons
65
+ def list_invalid_properties
66
+ invalid_properties = Array.new
67
+ invalid_properties
68
+ end
69
+
70
+ # Check to see if the all the properties in the model are valid
71
+ # @return true if the model is valid
72
+ def valid?
73
+ true
74
+ end
75
+
76
+ # Checks equality by comparing each attribute.
77
+ # @param [Object] Object to be compared
78
+ def ==(o)
79
+ return true if self.equal?(o)
80
+ self.class == o.class &&
81
+ relationships == o.relationships
82
+ end
83
+
84
+ # @see the `==` method
85
+ # @param [Object] Object to be compared
86
+ def eql?(o)
87
+ self == o
88
+ end
89
+
90
+ # Calculates hash code according to all attributes.
91
+ # @return [Integer] Hash code
92
+ def hash
93
+ [relationships].hash
94
+ end
95
+
96
+ # Builds the object from hash
97
+ # @param [Hash] attributes Model attributes in the form of hash
98
+ # @return [Object] Returns the model itself
99
+ def self.build_from_hash(attributes)
100
+ new.build_from_hash(attributes)
101
+ end
102
+
103
+ # Builds the object from hash
104
+ # @param [Hash] attributes Model attributes in the form of hash
105
+ # @return [Object] Returns the model itself
106
+ def build_from_hash(attributes)
107
+ return nil unless attributes.is_a?(Hash)
108
+ self.class.fastly_types.each_pair do |key, type|
109
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
110
+ self.send("#{key}=", nil)
111
+ elsif type =~ /\AArray<(.*)>/i
112
+ # check to ensure the input is an array given that the attribute
113
+ # is documented as an array but the input is not
114
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
115
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
116
+ end
117
+ elsif !attributes[self.class.attribute_map[key]].nil?
118
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
119
+ end
120
+ end
121
+
122
+ self
123
+ end
124
+
125
+ # Deserializes the data based on type
126
+ # @param string type Data type
127
+ # @param string value Value to be deserialized
128
+ # @return [Object] Deserialized data
129
+ def _deserialize(type, value)
130
+ case type.to_sym
131
+ when :Time
132
+ Time.parse(value)
133
+ when :Date
134
+ Date.parse(value)
135
+ when :String
136
+ value.to_s
137
+ when :Integer
138
+ value.to_i
139
+ when :Float
140
+ value.to_f
141
+ when :Boolean
142
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
143
+ true
144
+ else
145
+ false
146
+ end
147
+ when :Object
148
+ # generic object (usually a Hash), return directly
149
+ value
150
+ when /\AArray<(?<inner_type>.+)>\z/
151
+ inner_type = Regexp.last_match[:inner_type]
152
+ value.map { |v| _deserialize(inner_type, v) }
153
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
154
+ k_type = Regexp.last_match[:k_type]
155
+ v_type = Regexp.last_match[:v_type]
156
+ {}.tap do |hash|
157
+ value.each do |k, v|
158
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
159
+ end
160
+ end
161
+ else # model
162
+ # models (e.g. Pet) or oneOf
163
+ klass = Fastly.const_get(type)
164
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
165
+ end
166
+ end
167
+
168
+ # Returns the string representation of the object
169
+ # @return [String] String presentation of the object
170
+ def to_s
171
+ to_hash.to_s
172
+ end
173
+
174
+ # to_body is an alias to to_hash (backward compatibility)
175
+ # @return [Hash] Returns the object in the form of hash
176
+ def to_body
177
+ to_hash
178
+ end
179
+
180
+ # Returns the object in the form of hash
181
+ # @return [Hash] Returns the object in the form of hash
182
+ def to_hash
183
+ hash = {}
184
+ self.class.attribute_map.each_pair do |attr, param|
185
+ value = self.send(attr)
186
+ if value.nil?
187
+ is_nullable = self.class.fastly_nullable.include?(attr)
188
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
189
+ end
190
+
191
+ hash[param] = _to_hash(value)
192
+ end
193
+ hash
194
+ end
195
+
196
+ # Outputs non-array value in the form of hash
197
+ # For object, use to_hash. Otherwise, just return the value
198
+ # @param [Object] value Any valid value
199
+ # @return [Hash] Returns the value in the form of hash
200
+ def _to_hash(value)
201
+ if value.is_a?(Array)
202
+ value.compact.map { |v| _to_hash(v) }
203
+ elsif value.is_a?(Hash)
204
+ {}.tap do |hash|
205
+ value.each { |k, v| hash[k] = _to_hash(v) }
206
+ end
207
+ elsif value.respond_to? :to_hash
208
+ value.to_hash
209
+ else
210
+ value
211
+ end
212
+ end
213
+
214
+ end
215
+
216
+ end
@@ -12,7 +12,7 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class InvitationResponse
15
+ class InvitationCreateResponse
16
16
  attr_accessor :data
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -44,7 +44,7 @@ module Fastly
44
44
  def self.fastly_all_of
45
45
  [
46
46
  :'Invitation',
47
- :'InvitationResponseAllOf'
47
+ :'InvitationCreateResponseAllOf'
48
48
  ]
49
49
  end
50
50
 
@@ -52,13 +52,13 @@ module Fastly
52
52
  # @param [Hash] attributes Model attributes in the form of hash
53
53
  def initialize(attributes = {})
54
54
  if (!attributes.is_a?(Hash))
55
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvitationResponse` initialize method"
55
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvitationCreateResponse` initialize method"
56
56
  end
57
57
 
58
58
  # check to see if the attribute exists and convert string to symbol for hash key
59
59
  attributes = attributes.each_with_object({}) { |(k, v), h|
60
60
  if (!self.class.attribute_map.key?(k.to_sym))
61
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvitationResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
61
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvitationCreateResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
62
62
  end
63
63
  h[k.to_sym] = v
64
64
  }
@@ -12,7 +12,7 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class InvitationResponseAllOf
15
+ class InvitationCreateResponseAllOf
16
16
  attr_accessor :data
17
17
 
18
18
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -44,13 +44,13 @@ module Fastly
44
44
  # @param [Hash] attributes Model attributes in the form of hash
45
45
  def initialize(attributes = {})
46
46
  if (!attributes.is_a?(Hash))
47
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvitationResponseAllOf` initialize method"
47
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::InvitationCreateResponseAllOf` initialize method"
48
48
  end
49
49
 
50
50
  # check to see if the attribute exists and convert string to symbol for hash key
51
51
  attributes = attributes.each_with_object({}) { |(k, v), h|
52
52
  if (!self.class.attribute_map.key?(k.to_sym))
53
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvitationResponseAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
53
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::InvitationCreateResponseAllOf`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
54
54
  end
55
55
  h[k.to_sym] = v
56
56
  }
@@ -17,14 +17,11 @@ module Fastly
17
17
 
18
18
  attr_accessor :attributes
19
19
 
20
- attr_accessor :relationships
21
-
22
20
  # Attribute mapping from ruby-style variable name to JSON key.
23
21
  def self.attribute_map
24
22
  {
25
23
  :'type' => :'type',
26
- :'attributes' => :'attributes',
27
- :'relationships' => :'relationships'
24
+ :'attributes' => :'attributes'
28
25
  }
29
26
  end
30
27
 
@@ -37,8 +34,7 @@ module Fastly
37
34
  def self.fastly_types
38
35
  {
39
36
  :'type' => :'TypeInvitation',
40
- :'attributes' => :'InvitationDataAttributes',
41
- :'relationships' => :'RelationshipServiceInvitationsCreate'
37
+ :'attributes' => :'InvitationDataAttributes'
42
38
  }
43
39
  end
44
40
 
@@ -72,10 +68,6 @@ module Fastly
72
68
  if attributes.key?(:'attributes')
73
69
  self.attributes = attributes[:'attributes']
74
70
  end
75
-
76
- if attributes.key?(:'relationships')
77
- self.relationships = attributes[:'relationships']
78
- end
79
71
  end
80
72
 
81
73
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -97,8 +89,7 @@ module Fastly
97
89
  return true if self.equal?(o)
98
90
  self.class == o.class &&
99
91
  type == o.type &&
100
- attributes == o.attributes &&
101
- relationships == o.relationships
92
+ attributes == o.attributes
102
93
  end
103
94
 
104
95
  # @see the `==` method
@@ -110,7 +101,7 @@ module Fastly
110
101
  # Calculates hash code according to all attributes.
111
102
  # @return [Integer] Hash code
112
103
  def hash
113
- [type, attributes, relationships].hash
104
+ [type, attributes].hash
114
105
  end
115
106
 
116
107
  # Builds the object from hash
@@ -17,17 +17,17 @@ module Fastly
17
17
 
18
18
  attr_accessor :attributes
19
19
 
20
- attr_accessor :relationships
21
-
22
20
  attr_accessor :id
23
21
 
22
+ attr_accessor :relationships
23
+
24
24
  # Attribute mapping from ruby-style variable name to JSON key.
25
25
  def self.attribute_map
26
26
  {
27
27
  :'type' => :'type',
28
28
  :'attributes' => :'attributes',
29
- :'relationships' => :'relationships',
30
- :'id' => :'id'
29
+ :'id' => :'id',
30
+ :'relationships' => :'relationships'
31
31
  }
32
32
  end
33
33
 
@@ -41,8 +41,8 @@ module Fastly
41
41
  {
42
42
  :'type' => :'TypeInvitation',
43
43
  :'attributes' => :'Timestamps',
44
- :'relationships' => :'RelationshipsForInvitation',
45
- :'id' => :'String'
44
+ :'id' => :'String',
45
+ :'relationships' => :'RelationshipsForInvitation'
46
46
  }
47
47
  end
48
48
 
@@ -85,13 +85,13 @@ module Fastly
85
85
  self.attributes = attributes[:'attributes']
86
86
  end
87
87
 
88
- if attributes.key?(:'relationships')
89
- self.relationships = attributes[:'relationships']
90
- end
91
-
92
88
  if attributes.key?(:'id')
93
89
  self.id = attributes[:'id']
94
90
  end
91
+
92
+ if attributes.key?(:'relationships')
93
+ self.relationships = attributes[:'relationships']
94
+ end
95
95
  end
96
96
 
97
97
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -114,8 +114,8 @@ module Fastly
114
114
  self.class == o.class &&
115
115
  type == o.type &&
116
116
  attributes == o.attributes &&
117
- relationships == o.relationships &&
118
- id == o.id
117
+ id == o.id &&
118
+ relationships == o.relationships
119
119
  end
120
120
 
121
121
  # @see the `==` method
@@ -127,7 +127,7 @@ module Fastly
127
127
  # Calculates hash code according to all attributes.
128
128
  # @return [Integer] Hash code
129
129
  def hash
130
- [type, attributes, relationships, id].hash
130
+ [type, attributes, id, relationships].hash
131
131
  end
132
132
 
133
133
  # Builds the object from hash
@@ -12,7 +12,7 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LogTimeseriesGetResponse
15
+ class ListAttackReport
16
16
  attr_accessor :data
17
17
 
18
18
  attr_accessor :meta
@@ -33,8 +33,8 @@ module Fastly
33
33
  # Attribute type mapping.
34
34
  def self.fastly_types
35
35
  {
36
- :'data' => :'Array<LogTimeseriesResult>',
37
- :'meta' => :'LogTimeseriesGetResponseMeta'
36
+ :'data' => :'Array<AttackReport>',
37
+ :'meta' => :'ListAttackReportMeta'
38
38
  }
39
39
  end
40
40
 
@@ -48,13 +48,13 @@ module Fastly
48
48
  # @param [Hash] attributes Model attributes in the form of hash
49
49
  def initialize(attributes = {})
50
50
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LogTimeseriesGetResponse` initialize method"
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ListAttackReport` initialize method"
52
52
  end
53
53
 
54
54
  # check to see if the attribute exists and convert string to symbol for hash key
55
55
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
56
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LogTimeseriesGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ListAttackReport`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
58
  end
59
59
  h[k.to_sym] = v
60
60
  }
@@ -0,0 +1,218 @@
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
+ # Metadata about the request.
16
+ class ListAttackReportMeta
17
+ # The count of attack reports matching the filter.
18
+ attr_accessor :total
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'total' => :'total'
24
+ }
25
+ end
26
+
27
+ # Returns all the JSON keys this model knows about
28
+ def self.acceptable_attributes
29
+ attribute_map.values
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.fastly_types
34
+ {
35
+ :'total' => :'Integer'
36
+ }
37
+ end
38
+
39
+ # List of attributes with nullable: true
40
+ def self.fastly_nullable
41
+ Set.new([
42
+ ])
43
+ end
44
+
45
+ # Initializes the object
46
+ # @param [Hash] attributes Model attributes in the form of hash
47
+ def initialize(attributes = {})
48
+ if (!attributes.is_a?(Hash))
49
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::ListAttackReportMeta` initialize method"
50
+ end
51
+
52
+ # check to see if the attribute exists and convert string to symbol for hash key
53
+ attributes = attributes.each_with_object({}) { |(k, v), h|
54
+ if (!self.class.attribute_map.key?(k.to_sym))
55
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::ListAttackReportMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
56
+ end
57
+ h[k.to_sym] = v
58
+ }
59
+
60
+ if attributes.key?(:'total')
61
+ self.total = attributes[:'total']
62
+ end
63
+ end
64
+
65
+ # Show invalid properties with the reasons. Usually used together with valid?
66
+ # @return Array for valid properties with the reasons
67
+ def list_invalid_properties
68
+ invalid_properties = Array.new
69
+ invalid_properties
70
+ end
71
+
72
+ # Check to see if the all the properties in the model are valid
73
+ # @return true if the model is valid
74
+ def valid?
75
+ true
76
+ end
77
+
78
+ # Checks equality by comparing each attribute.
79
+ # @param [Object] Object to be compared
80
+ def ==(o)
81
+ return true if self.equal?(o)
82
+ self.class == o.class &&
83
+ total == o.total
84
+ end
85
+
86
+ # @see the `==` method
87
+ # @param [Object] Object to be compared
88
+ def eql?(o)
89
+ self == o
90
+ end
91
+
92
+ # Calculates hash code according to all attributes.
93
+ # @return [Integer] Hash code
94
+ def hash
95
+ [total].hash
96
+ end
97
+
98
+ # Builds the object from hash
99
+ # @param [Hash] attributes Model attributes in the form of hash
100
+ # @return [Object] Returns the model itself
101
+ def self.build_from_hash(attributes)
102
+ new.build_from_hash(attributes)
103
+ end
104
+
105
+ # Builds the object from hash
106
+ # @param [Hash] attributes Model attributes in the form of hash
107
+ # @return [Object] Returns the model itself
108
+ def build_from_hash(attributes)
109
+ return nil unless attributes.is_a?(Hash)
110
+ self.class.fastly_types.each_pair do |key, type|
111
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
112
+ self.send("#{key}=", nil)
113
+ elsif type =~ /\AArray<(.*)>/i
114
+ # check to ensure the input is an array given that the attribute
115
+ # is documented as an array but the input is not
116
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
117
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
118
+ end
119
+ elsif !attributes[self.class.attribute_map[key]].nil?
120
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
121
+ end
122
+ end
123
+
124
+ self
125
+ end
126
+
127
+ # Deserializes the data based on type
128
+ # @param string type Data type
129
+ # @param string value Value to be deserialized
130
+ # @return [Object] Deserialized data
131
+ def _deserialize(type, value)
132
+ case type.to_sym
133
+ when :Time
134
+ Time.parse(value)
135
+ when :Date
136
+ Date.parse(value)
137
+ when :String
138
+ value.to_s
139
+ when :Integer
140
+ value.to_i
141
+ when :Float
142
+ value.to_f
143
+ when :Boolean
144
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
145
+ true
146
+ else
147
+ false
148
+ end
149
+ when :Object
150
+ # generic object (usually a Hash), return directly
151
+ value
152
+ when /\AArray<(?<inner_type>.+)>\z/
153
+ inner_type = Regexp.last_match[:inner_type]
154
+ value.map { |v| _deserialize(inner_type, v) }
155
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
156
+ k_type = Regexp.last_match[:k_type]
157
+ v_type = Regexp.last_match[:v_type]
158
+ {}.tap do |hash|
159
+ value.each do |k, v|
160
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
161
+ end
162
+ end
163
+ else # model
164
+ # models (e.g. Pet) or oneOf
165
+ klass = Fastly.const_get(type)
166
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
167
+ end
168
+ end
169
+
170
+ # Returns the string representation of the object
171
+ # @return [String] String presentation of the object
172
+ def to_s
173
+ to_hash.to_s
174
+ end
175
+
176
+ # to_body is an alias to to_hash (backward compatibility)
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_body
179
+ to_hash
180
+ end
181
+
182
+ # Returns the object in the form of hash
183
+ # @return [Hash] Returns the object in the form of hash
184
+ def to_hash
185
+ hash = {}
186
+ self.class.attribute_map.each_pair do |attr, param|
187
+ value = self.send(attr)
188
+ if value.nil?
189
+ is_nullable = self.class.fastly_nullable.include?(attr)
190
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
191
+ end
192
+
193
+ hash[param] = _to_hash(value)
194
+ end
195
+ hash
196
+ end
197
+
198
+ # Outputs non-array value in the form of hash
199
+ # For object, use to_hash. Otherwise, just return the value
200
+ # @param [Object] value Any valid value
201
+ # @return [Hash] Returns the value in the form of hash
202
+ def _to_hash(value)
203
+ if value.is_a?(Array)
204
+ value.compact.map { |v| _to_hash(v) }
205
+ elsif value.is_a?(Hash)
206
+ {}.tap do |hash|
207
+ value.each { |k, v| hash[k] = _to_hash(v) }
208
+ end
209
+ elsif value.respond_to? :to_hash
210
+ value.to_hash
211
+ else
212
+ value
213
+ end
214
+ end
215
+
216
+ end
217
+
218
+ end