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,227 @@
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 TimeseriesGetResponse
16
+ attr_accessor :data
17
+
18
+ attr_accessor :meta
19
+
20
+ # Attribute mapping from ruby-style variable name to JSON key.
21
+ def self.attribute_map
22
+ {
23
+ :'data' => :'data',
24
+ :'meta' => :'meta'
25
+ }
26
+ end
27
+
28
+ # Returns all the JSON keys this model knows about
29
+ def self.acceptable_attributes
30
+ attribute_map.values
31
+ end
32
+
33
+ # Attribute type mapping.
34
+ def self.fastly_types
35
+ {
36
+ :'data' => :'Array<TimeseriesResult>',
37
+ :'meta' => :'TimeseriesMeta'
38
+ }
39
+ end
40
+
41
+ # List of attributes with nullable: true
42
+ def self.fastly_nullable
43
+ Set.new([
44
+ ])
45
+ end
46
+
47
+ # Initializes the object
48
+ # @param [Hash] attributes Model attributes in the form of hash
49
+ def initialize(attributes = {})
50
+ if (!attributes.is_a?(Hash))
51
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TimeseriesGetResponse` initialize method"
52
+ end
53
+
54
+ # check to see if the attribute exists and convert string to symbol for hash key
55
+ attributes = attributes.each_with_object({}) { |(k, v), h|
56
+ if (!self.class.attribute_map.key?(k.to_sym))
57
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TimeseriesGetResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
+ end
59
+ h[k.to_sym] = v
60
+ }
61
+
62
+ if attributes.key?(:'data')
63
+ if (value = attributes[:'data']).is_a?(Array)
64
+ self.data = value
65
+ end
66
+ end
67
+
68
+ if attributes.key?(:'meta')
69
+ self.meta = attributes[:'meta']
70
+ end
71
+ end
72
+
73
+ # Show invalid properties with the reasons. Usually used together with valid?
74
+ # @return Array for valid properties with the reasons
75
+ def list_invalid_properties
76
+ invalid_properties = Array.new
77
+ invalid_properties
78
+ end
79
+
80
+ # Check to see if the all the properties in the model are valid
81
+ # @return true if the model is valid
82
+ def valid?
83
+ true
84
+ end
85
+
86
+ # Checks equality by comparing each attribute.
87
+ # @param [Object] Object to be compared
88
+ def ==(o)
89
+ return true if self.equal?(o)
90
+ self.class == o.class &&
91
+ data == o.data &&
92
+ meta == o.meta
93
+ end
94
+
95
+ # @see the `==` method
96
+ # @param [Object] Object to be compared
97
+ def eql?(o)
98
+ self == o
99
+ end
100
+
101
+ # Calculates hash code according to all attributes.
102
+ # @return [Integer] Hash code
103
+ def hash
104
+ [data, meta].hash
105
+ end
106
+
107
+ # Builds the object from hash
108
+ # @param [Hash] attributes Model attributes in the form of hash
109
+ # @return [Object] Returns the model itself
110
+ def self.build_from_hash(attributes)
111
+ new.build_from_hash(attributes)
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 build_from_hash(attributes)
118
+ return nil unless attributes.is_a?(Hash)
119
+ self.class.fastly_types.each_pair do |key, type|
120
+ if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
121
+ self.send("#{key}=", nil)
122
+ elsif type =~ /\AArray<(.*)>/i
123
+ # check to ensure the input is an array given that the attribute
124
+ # is documented as an array but the input is not
125
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
126
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
127
+ end
128
+ elsif !attributes[self.class.attribute_map[key]].nil?
129
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
130
+ end
131
+ end
132
+
133
+ self
134
+ end
135
+
136
+ # Deserializes the data based on type
137
+ # @param string type Data type
138
+ # @param string value Value to be deserialized
139
+ # @return [Object] Deserialized data
140
+ def _deserialize(type, value)
141
+ case type.to_sym
142
+ when :Time
143
+ Time.parse(value)
144
+ when :Date
145
+ Date.parse(value)
146
+ when :String
147
+ value.to_s
148
+ when :Integer
149
+ value.to_i
150
+ when :Float
151
+ value.to_f
152
+ when :Boolean
153
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
154
+ true
155
+ else
156
+ false
157
+ end
158
+ when :Object
159
+ # generic object (usually a Hash), return directly
160
+ value
161
+ when /\AArray<(?<inner_type>.+)>\z/
162
+ inner_type = Regexp.last_match[:inner_type]
163
+ value.map { |v| _deserialize(inner_type, v) }
164
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
165
+ k_type = Regexp.last_match[:k_type]
166
+ v_type = Regexp.last_match[:v_type]
167
+ {}.tap do |hash|
168
+ value.each do |k, v|
169
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
170
+ end
171
+ end
172
+ else # model
173
+ # models (e.g. Pet) or oneOf
174
+ klass = Fastly.const_get(type)
175
+ klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
176
+ end
177
+ end
178
+
179
+ # Returns the string representation of the object
180
+ # @return [String] String presentation of the object
181
+ def to_s
182
+ to_hash.to_s
183
+ end
184
+
185
+ # to_body is an alias to to_hash (backward compatibility)
186
+ # @return [Hash] Returns the object in the form of hash
187
+ def to_body
188
+ to_hash
189
+ end
190
+
191
+ # Returns the object in the form of hash
192
+ # @return [Hash] Returns the object in the form of hash
193
+ def to_hash
194
+ hash = {}
195
+ self.class.attribute_map.each_pair do |attr, param|
196
+ value = self.send(attr)
197
+ if value.nil?
198
+ is_nullable = self.class.fastly_nullable.include?(attr)
199
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
200
+ end
201
+
202
+ hash[param] = _to_hash(value)
203
+ end
204
+ hash
205
+ end
206
+
207
+ # Outputs non-array value in the form of hash
208
+ # For object, use to_hash. Otherwise, just return the value
209
+ # @param [Object] value Any valid value
210
+ # @return [Hash] Returns the value in the form of hash
211
+ def _to_hash(value)
212
+ if value.is_a?(Array)
213
+ value.compact.map { |v| _to_hash(v) }
214
+ elsif value.is_a?(Hash)
215
+ {}.tap do |hash|
216
+ value.each { |k, v| hash[k] = _to_hash(v) }
217
+ end
218
+ elsif value.respond_to? :to_hash
219
+ value.to_hash
220
+ else
221
+ value
222
+ end
223
+ end
224
+
225
+ end
226
+
227
+ end
@@ -12,29 +12,26 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LogTimeseriesGetResponseMeta
16
- # ID of the service for which data was returned.
17
- attr_accessor :service_id
18
-
15
+ class TimeseriesMeta
19
16
  # Start time for the query as supplied in the request.
20
- attr_accessor :start
17
+ attr_accessor :from
21
18
 
22
19
  # End time for the query as supplied in the request.
23
- attr_accessor :_end
20
+ attr_accessor :to
24
21
 
25
22
  # The granularity of the time buckets in the response.
26
23
  attr_accessor :granularity
27
24
 
28
- attr_accessor :filters
25
+ # Maximum number of results returned in the request.
26
+ attr_accessor :limit
29
27
 
30
28
  # Attribute mapping from ruby-style variable name to JSON key.
31
29
  def self.attribute_map
32
30
  {
33
- :'service_id' => :'service_id',
34
- :'start' => :'start',
35
- :'_end' => :'end',
31
+ :'from' => :'from',
32
+ :'to' => :'to',
36
33
  :'granularity' => :'granularity',
37
- :'filters' => :'filters'
34
+ :'limit' => :'limit'
38
35
  }
39
36
  end
40
37
 
@@ -46,11 +43,10 @@ module Fastly
46
43
  # Attribute type mapping.
47
44
  def self.fastly_types
48
45
  {
49
- :'service_id' => :'String',
50
- :'start' => :'String',
51
- :'_end' => :'String',
46
+ :'from' => :'String',
47
+ :'to' => :'String',
52
48
  :'granularity' => :'String',
53
- :'filters' => :'LogTimeseriesGetResponseMetaFilters'
49
+ :'limit' => :'String'
54
50
  }
55
51
  end
56
52
 
@@ -64,35 +60,31 @@ module Fastly
64
60
  # @param [Hash] attributes Model attributes in the form of hash
65
61
  def initialize(attributes = {})
66
62
  if (!attributes.is_a?(Hash))
67
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LogTimeseriesGetResponseMeta` initialize method"
63
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TimeseriesMeta` initialize method"
68
64
  end
69
65
 
70
66
  # check to see if the attribute exists and convert string to symbol for hash key
71
67
  attributes = attributes.each_with_object({}) { |(k, v), h|
72
68
  if (!self.class.attribute_map.key?(k.to_sym))
73
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LogTimeseriesGetResponseMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
69
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TimeseriesMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
74
70
  end
75
71
  h[k.to_sym] = v
76
72
  }
77
73
 
78
- if attributes.key?(:'service_id')
79
- self.service_id = attributes[:'service_id']
80
- end
81
-
82
- if attributes.key?(:'start')
83
- self.start = attributes[:'start']
74
+ if attributes.key?(:'from')
75
+ self.from = attributes[:'from']
84
76
  end
85
77
 
86
- if attributes.key?(:'_end')
87
- self._end = attributes[:'_end']
78
+ if attributes.key?(:'to')
79
+ self.to = attributes[:'to']
88
80
  end
89
81
 
90
82
  if attributes.key?(:'granularity')
91
83
  self.granularity = attributes[:'granularity']
92
84
  end
93
85
 
94
- if attributes.key?(:'filters')
95
- self.filters = attributes[:'filters']
86
+ if attributes.key?(:'limit')
87
+ self.limit = attributes[:'limit']
96
88
  end
97
89
  end
98
90
 
@@ -114,11 +106,10 @@ module Fastly
114
106
  def ==(o)
115
107
  return true if self.equal?(o)
116
108
  self.class == o.class &&
117
- service_id == o.service_id &&
118
- start == o.start &&
119
- _end == o._end &&
109
+ from == o.from &&
110
+ to == o.to &&
120
111
  granularity == o.granularity &&
121
- filters == o.filters
112
+ limit == o.limit
122
113
  end
123
114
 
124
115
  # @see the `==` method
@@ -130,7 +121,7 @@ module Fastly
130
121
  # Calculates hash code according to all attributes.
131
122
  # @return [Integer] Hash code
132
123
  def hash
133
- [service_id, start, _end, granularity, filters].hash
124
+ [from, to, granularity, limit].hash
134
125
  end
135
126
 
136
127
  # Builds the object from hash
@@ -12,9 +12,11 @@ require 'date'
12
12
  require 'time'
13
13
 
14
14
  module Fastly
15
- class LogTimeseriesResult
15
+ class TimeseriesResult
16
+ # An object containing each requested dimension and time as properties.
16
17
  attr_accessor :dimensions
17
18
 
19
+ # An object containing each requested series as a property.
18
20
  attr_accessor :values
19
21
 
20
22
  # Attribute mapping from ruby-style variable name to JSON key.
@@ -33,7 +35,7 @@ module Fastly
33
35
  # Attribute type mapping.
34
36
  def self.fastly_types
35
37
  {
36
- :'dimensions' => :'LogTimeseriesResultDimensions',
38
+ :'dimensions' => :'Hash<String, Object>',
37
39
  :'values' => :'Hash<String, Object>'
38
40
  }
39
41
  end
@@ -48,19 +50,21 @@ module Fastly
48
50
  # @param [Hash] attributes Model attributes in the form of hash
49
51
  def initialize(attributes = {})
50
52
  if (!attributes.is_a?(Hash))
51
- fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LogTimeseriesResult` initialize method"
53
+ fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::TimeseriesResult` initialize method"
52
54
  end
53
55
 
54
56
  # check to see if the attribute exists and convert string to symbol for hash key
55
57
  attributes = attributes.each_with_object({}) { |(k, v), h|
56
58
  if (!self.class.attribute_map.key?(k.to_sym))
57
- fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::LogTimeseriesResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
59
+ fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::TimeseriesResult`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
58
60
  end
59
61
  h[k.to_sym] = v
60
62
  }
61
63
 
62
64
  if attributes.key?(:'dimensions')
63
- self.dimensions = attributes[:'dimensions']
65
+ if (value = attributes[:'dimensions']).is_a?(Hash)
66
+ self.dimensions = value
67
+ end
64
68
  end
65
69
 
66
70
  if attributes.key?(:'values')
@@ -19,11 +19,15 @@ module Fastly
19
19
  # A customizable name for your certificate. Defaults to the certificate's Common Name or first Subject Alternative Names (SAN) entry. Optional.
20
20
  attr_accessor :name
21
21
 
22
+ # Indicates that the supplied certificate was not signed by a trusted CA.
23
+ attr_accessor :allow_untrusted_root
24
+
22
25
  # Attribute mapping from ruby-style variable name to JSON key.
23
26
  def self.attribute_map
24
27
  {
25
28
  :'cert_blob' => :'cert_blob',
26
- :'name' => :'name'
29
+ :'name' => :'name',
30
+ :'allow_untrusted_root' => :'allow_untrusted_root'
27
31
  }
28
32
  end
29
33
 
@@ -36,7 +40,8 @@ module Fastly
36
40
  def self.fastly_types
37
41
  {
38
42
  :'cert_blob' => :'String',
39
- :'name' => :'String'
43
+ :'name' => :'String',
44
+ :'allow_untrusted_root' => :'Boolean'
40
45
  }
41
46
  end
42
47
 
@@ -68,6 +73,10 @@ module Fastly
68
73
  if attributes.key?(:'name')
69
74
  self.name = attributes[:'name']
70
75
  end
76
+
77
+ if attributes.key?(:'allow_untrusted_root')
78
+ self.allow_untrusted_root = attributes[:'allow_untrusted_root']
79
+ end
71
80
  end
72
81
 
73
82
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -89,7 +98,8 @@ module Fastly
89
98
  return true if self.equal?(o)
90
99
  self.class == o.class &&
91
100
  cert_blob == o.cert_blob &&
92
- name == o.name
101
+ name == o.name &&
102
+ allow_untrusted_root == o.allow_untrusted_root
93
103
  end
94
104
 
95
105
  # @see the `==` method
@@ -101,7 +111,7 @@ module Fastly
101
111
  # Calculates hash code according to all attributes.
102
112
  # @return [Integer] Hash code
103
113
  def hash
104
- [cert_blob, name].hash
114
+ [cert_blob, name, allow_untrusted_root].hash
105
115
  end
106
116
 
107
117
  # Builds the object from hash
@@ -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' => :'TypeTlsCsr',
40
- :'attributes' => :'TlsCsrDataAttributes',
41
- :'relationships' => :'RelationshipTlsPrivateKey'
37
+ :'attributes' => :'TlsCsrDataAttributes'
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
@@ -46,6 +46,9 @@ module Fastly
46
46
  # CSR Key Type.
47
47
  attr_accessor :key_type
48
48
 
49
+ # Optional. An alphanumeric string identifying the private key you've uploaded for use with your TLS certificate. If left blank, Fastly will create and manage a key for you.
50
+ attr_accessor :relationships_tls_private_key_id
51
+
49
52
  class EnumAttributeValidator
50
53
  attr_reader :datatype
51
54
  attr_reader :allowable_values
@@ -81,7 +84,8 @@ module Fastly
81
84
  :'organization' => :'organization',
82
85
  :'organizational_unit' => :'organizational_unit',
83
86
  :'email' => :'email',
84
- :'key_type' => :'key_type'
87
+ :'key_type' => :'key_type',
88
+ :'relationships_tls_private_key_id' => :'relationships.tls_private_key.id'
85
89
  }
86
90
  end
87
91
 
@@ -103,7 +107,8 @@ module Fastly
103
107
  :'organization' => :'String',
104
108
  :'organizational_unit' => :'String',
105
109
  :'email' => :'String',
106
- :'key_type' => :'String'
110
+ :'key_type' => :'String',
111
+ :'relationships_tls_private_key_id' => :'String'
107
112
  }
108
113
  end
109
114
 
@@ -173,6 +178,10 @@ module Fastly
173
178
  if attributes.key?(:'key_type')
174
179
  self.key_type = attributes[:'key_type']
175
180
  end
181
+
182
+ if attributes.key?(:'relationships_tls_private_key_id')
183
+ self.relationships_tls_private_key_id = attributes[:'relationships_tls_private_key_id']
184
+ end
176
185
  end
177
186
 
178
187
  # Show invalid properties with the reasons. Usually used together with valid?
@@ -220,7 +229,8 @@ module Fastly
220
229
  organization == o.organization &&
221
230
  organizational_unit == o.organizational_unit &&
222
231
  email == o.email &&
223
- key_type == o.key_type
232
+ key_type == o.key_type &&
233
+ relationships_tls_private_key_id == o.relationships_tls_private_key_id
224
234
  end
225
235
 
226
236
  # @see the `==` method
@@ -232,7 +242,7 @@ module Fastly
232
242
  # Calculates hash code according to all attributes.
233
243
  # @return [Integer] Hash code
234
244
  def hash
235
- [sans, common_name, country, state, city, postal_code, street_address, organization, organizational_unit, email, key_type].hash
245
+ [sans, common_name, country, state, city, postal_code, street_address, organization, organizational_unit, email, key_type, relationships_tls_private_key_id].hash
236
246
  end
237
247
 
238
248
  # Builds the object from hash