fastly 7.1.0 → 7.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +17 -0
- data/Gemfile.lock +2 -2
- data/README.md +6 -5
- data/docs/EventsApi.md +8 -0
- data/docs/HistoricalDdos.md +13 -0
- data/docs/HistoricalDdosMeta.md +13 -0
- data/docs/HistoricalFieldResultsAttributes.md +9 -0
- data/docs/KvStoreApi.md +15 -15
- data/docs/LoggingLogentriesAdditional.md +1 -1
- data/docs/LoggingLogentriesApi.md +4 -4
- data/docs/LoggingLogentriesResponse.md +1 -1
- data/docs/PlatformDdosDataItems.md +10 -0
- data/docs/PlatformDdosEntry.md +10 -0
- data/docs/PlatformDdosResponse.md +13 -0
- data/docs/PlatformDdosResponseAllOf.md +10 -0
- data/docs/RealtimeEntryAggregated.md +9 -0
- data/docs/RealtimeMeasurements.md +9 -0
- data/docs/Results.md +9 -0
- data/docs/SchemasSnippetResponse.md +1 -1
- data/docs/SchemasSnippetResponseCommon.md +15 -0
- data/docs/Snippet.md +1 -1
- data/docs/SnippetAllOf.md +10 -0
- data/docs/SnippetApi.md +6 -6
- data/docs/SnippetCommon.md +13 -0
- data/docs/SnippetResponse.md +1 -1
- data/docs/SnippetResponseCommon.md +15 -0
- data/docs/{SnippetResponseAllOf.md → SnippetResponseCommonAllOf.md} +1 -1
- data/docs/SnippetResponsePost.md +20 -0
- data/docs/SnippetWithDynamicNumber.md +14 -0
- data/docs/SnippetWithDynamicNumberAllOf.md +10 -0
- data/docs/ValuesDdos.md +15 -0
- data/docs/WholePlatformDdosHistoricalApi.md +56 -0
- data/lib/fastly/api/events_api.rb +12 -0
- data/lib/fastly/api/kv_store_api.rb +14 -14
- data/lib/fastly/api/logging_logentries_api.rb +4 -4
- data/lib/fastly/api/snippet_api.rb +17 -17
- data/lib/fastly/api/whole_platform_ddos_historical_api.rb +89 -0
- data/lib/fastly/configuration.rb +6 -0
- data/lib/fastly/models/historical_ddos.rb +249 -0
- data/lib/fastly/models/historical_ddos_meta.rb +248 -0
- data/lib/fastly/models/historical_field_results_attributes.rb +91 -1
- data/lib/fastly/models/logging_logentries_additional.rb +1 -1
- data/lib/fastly/models/logging_logentries_response.rb +1 -1
- data/lib/fastly/models/platform_ddos_data_items.rb +216 -0
- data/lib/fastly/models/platform_ddos_entry.rb +219 -0
- data/lib/fastly/models/platform_ddos_response.rb +257 -0
- data/lib/fastly/models/platform_ddos_response_all_of.rb +219 -0
- data/lib/fastly/models/realtime_entry_aggregated.rb +94 -4
- data/lib/fastly/models/realtime_measurements.rb +94 -4
- data/lib/fastly/models/results.rb +94 -4
- data/lib/fastly/models/schemas_snippet_response.rb +25 -26
- data/lib/fastly/models/schemas_snippet_response_common.rb +276 -0
- data/lib/fastly/models/snippet.rb +34 -26
- data/lib/fastly/models/snippet_all_of.rb +251 -0
- data/lib/fastly/models/snippet_common.rb +283 -0
- data/lib/fastly/models/snippet_response.rb +24 -25
- data/lib/fastly/models/snippet_response_common.rb +276 -0
- data/lib/fastly/models/{snippet_response_all_of.rb → snippet_response_common_all_of.rb} +3 -3
- data/lib/fastly/models/snippet_response_post.rb +374 -0
- data/lib/fastly/models/snippet_with_dynamic_number.rb +313 -0
- data/lib/fastly/models/snippet_with_dynamic_number_all_of.rb +251 -0
- data/lib/fastly/models/values_ddos.rb +268 -0
- data/lib/fastly/version.rb +1 -1
- data/lib/fastly.rb +16 -1
- data/sig.json +1 -1
- metadata +34 -4
@@ -0,0 +1,249 @@
|
|
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://developer.fastly.com/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 HistoricalDdos
|
16
|
+
# Whether or not we were able to successfully execute the query.
|
17
|
+
attr_accessor :status
|
18
|
+
|
19
|
+
attr_accessor :meta
|
20
|
+
|
21
|
+
# If the query was not successful, this will provide a string that explains why.
|
22
|
+
attr_accessor :msg
|
23
|
+
|
24
|
+
# A list of [entries](#entry-data-model).
|
25
|
+
attr_accessor :data
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'status' => :'status',
|
31
|
+
:'meta' => :'meta',
|
32
|
+
:'msg' => :'msg',
|
33
|
+
:'data' => :'data'
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
# Returns all the JSON keys this model knows about
|
38
|
+
def self.acceptable_attributes
|
39
|
+
attribute_map.values
|
40
|
+
end
|
41
|
+
|
42
|
+
# Attribute type mapping.
|
43
|
+
def self.fastly_types
|
44
|
+
{
|
45
|
+
:'status' => :'String',
|
46
|
+
:'meta' => :'HistoricalDdosMeta',
|
47
|
+
:'msg' => :'String',
|
48
|
+
:'data' => :'Array<PlatformDdosDataItems>'
|
49
|
+
}
|
50
|
+
end
|
51
|
+
|
52
|
+
# List of attributes with nullable: true
|
53
|
+
def self.fastly_nullable
|
54
|
+
Set.new([
|
55
|
+
:'msg',
|
56
|
+
])
|
57
|
+
end
|
58
|
+
|
59
|
+
# Initializes the object
|
60
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
61
|
+
def initialize(attributes = {})
|
62
|
+
if (!attributes.is_a?(Hash))
|
63
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::HistoricalDdos` initialize method"
|
64
|
+
end
|
65
|
+
|
66
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
67
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
68
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
69
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::HistoricalDdos`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
70
|
+
end
|
71
|
+
h[k.to_sym] = v
|
72
|
+
}
|
73
|
+
|
74
|
+
if attributes.key?(:'status')
|
75
|
+
self.status = attributes[:'status']
|
76
|
+
end
|
77
|
+
|
78
|
+
if attributes.key?(:'meta')
|
79
|
+
self.meta = attributes[:'meta']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes.key?(:'msg')
|
83
|
+
self.msg = attributes[:'msg']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes.key?(:'data')
|
87
|
+
if (value = attributes[:'data']).is_a?(Array)
|
88
|
+
self.data = value
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
94
|
+
# @return Array for valid properties with the reasons
|
95
|
+
def list_invalid_properties
|
96
|
+
invalid_properties = Array.new
|
97
|
+
invalid_properties
|
98
|
+
end
|
99
|
+
|
100
|
+
# Check to see if the all the properties in the model are valid
|
101
|
+
# @return true if the model is valid
|
102
|
+
def valid?
|
103
|
+
true
|
104
|
+
end
|
105
|
+
|
106
|
+
# Checks equality by comparing each attribute.
|
107
|
+
# @param [Object] Object to be compared
|
108
|
+
def ==(o)
|
109
|
+
return true if self.equal?(o)
|
110
|
+
self.class == o.class &&
|
111
|
+
status == o.status &&
|
112
|
+
meta == o.meta &&
|
113
|
+
msg == o.msg &&
|
114
|
+
data == o.data
|
115
|
+
end
|
116
|
+
|
117
|
+
# @see the `==` method
|
118
|
+
# @param [Object] Object to be compared
|
119
|
+
def eql?(o)
|
120
|
+
self == o
|
121
|
+
end
|
122
|
+
|
123
|
+
# Calculates hash code according to all attributes.
|
124
|
+
# @return [Integer] Hash code
|
125
|
+
def hash
|
126
|
+
[status, meta, msg, data].hash
|
127
|
+
end
|
128
|
+
|
129
|
+
# Builds the object from hash
|
130
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
131
|
+
# @return [Object] Returns the model itself
|
132
|
+
def self.build_from_hash(attributes)
|
133
|
+
new.build_from_hash(attributes)
|
134
|
+
end
|
135
|
+
|
136
|
+
# Builds the object from hash
|
137
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
138
|
+
# @return [Object] Returns the model itself
|
139
|
+
def build_from_hash(attributes)
|
140
|
+
return nil unless attributes.is_a?(Hash)
|
141
|
+
self.class.fastly_types.each_pair do |key, type|
|
142
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
143
|
+
self.send("#{key}=", nil)
|
144
|
+
elsif type =~ /\AArray<(.*)>/i
|
145
|
+
# check to ensure the input is an array given that the attribute
|
146
|
+
# is documented as an array but the input is not
|
147
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
148
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
149
|
+
end
|
150
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
151
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
152
|
+
end
|
153
|
+
end
|
154
|
+
|
155
|
+
self
|
156
|
+
end
|
157
|
+
|
158
|
+
# Deserializes the data based on type
|
159
|
+
# @param string type Data type
|
160
|
+
# @param string value Value to be deserialized
|
161
|
+
# @return [Object] Deserialized data
|
162
|
+
def _deserialize(type, value)
|
163
|
+
case type.to_sym
|
164
|
+
when :Time
|
165
|
+
Time.parse(value)
|
166
|
+
when :Date
|
167
|
+
Date.parse(value)
|
168
|
+
when :String
|
169
|
+
value.to_s
|
170
|
+
when :Integer
|
171
|
+
value.to_i
|
172
|
+
when :Float
|
173
|
+
value.to_f
|
174
|
+
when :Boolean
|
175
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
176
|
+
true
|
177
|
+
else
|
178
|
+
false
|
179
|
+
end
|
180
|
+
when :Object
|
181
|
+
# generic object (usually a Hash), return directly
|
182
|
+
value
|
183
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
184
|
+
inner_type = Regexp.last_match[:inner_type]
|
185
|
+
value.map { |v| _deserialize(inner_type, v) }
|
186
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
187
|
+
k_type = Regexp.last_match[:k_type]
|
188
|
+
v_type = Regexp.last_match[:v_type]
|
189
|
+
{}.tap do |hash|
|
190
|
+
value.each do |k, v|
|
191
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
192
|
+
end
|
193
|
+
end
|
194
|
+
else # model
|
195
|
+
# models (e.g. Pet) or oneOf
|
196
|
+
klass = Fastly.const_get(type)
|
197
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
201
|
+
# Returns the string representation of the object
|
202
|
+
# @return [String] String presentation of the object
|
203
|
+
def to_s
|
204
|
+
to_hash.to_s
|
205
|
+
end
|
206
|
+
|
207
|
+
# to_body is an alias to to_hash (backward compatibility)
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
209
|
+
def to_body
|
210
|
+
to_hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Returns the object in the form of hash
|
214
|
+
# @return [Hash] Returns the object in the form of hash
|
215
|
+
def to_hash
|
216
|
+
hash = {}
|
217
|
+
self.class.attribute_map.each_pair do |attr, param|
|
218
|
+
value = self.send(attr)
|
219
|
+
if value.nil?
|
220
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
221
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
222
|
+
end
|
223
|
+
|
224
|
+
hash[param] = _to_hash(value)
|
225
|
+
end
|
226
|
+
hash
|
227
|
+
end
|
228
|
+
|
229
|
+
# Outputs non-array value in the form of hash
|
230
|
+
# For object, use to_hash. Otherwise, just return the value
|
231
|
+
# @param [Object] value Any valid value
|
232
|
+
# @return [Hash] Returns the value in the form of hash
|
233
|
+
def _to_hash(value)
|
234
|
+
if value.is_a?(Array)
|
235
|
+
value.compact.map { |v| _to_hash(v) }
|
236
|
+
elsif value.is_a?(Hash)
|
237
|
+
{}.tap do |hash|
|
238
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
239
|
+
end
|
240
|
+
elsif value.respond_to? :to_hash
|
241
|
+
value.to_hash
|
242
|
+
else
|
243
|
+
value
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
end
|
248
|
+
|
249
|
+
end
|
@@ -0,0 +1,248 @@
|
|
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://developer.fastly.com/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
|
+
# Meta information about the scope of the query in a human readable format.
|
16
|
+
class HistoricalDdosMeta
|
17
|
+
# Start time that was used to perform the query as an ISO-8601-formatted date and time.
|
18
|
+
attr_accessor :start
|
19
|
+
|
20
|
+
# End time that was used to perform the query as an ISO-8601-formatted date and time.
|
21
|
+
attr_accessor :_end
|
22
|
+
|
23
|
+
# Downsample that was used to perform the query. One of `hour` or `day`.
|
24
|
+
attr_accessor :downsample
|
25
|
+
|
26
|
+
# A comma-separated list of the metrics that were requested.
|
27
|
+
attr_accessor :metric
|
28
|
+
|
29
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
30
|
+
def self.attribute_map
|
31
|
+
{
|
32
|
+
:'start' => :'start',
|
33
|
+
:'_end' => :'end',
|
34
|
+
:'downsample' => :'downsample',
|
35
|
+
:'metric' => :'metric'
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Returns all the JSON keys this model knows about
|
40
|
+
def self.acceptable_attributes
|
41
|
+
attribute_map.values
|
42
|
+
end
|
43
|
+
|
44
|
+
# Attribute type mapping.
|
45
|
+
def self.fastly_types
|
46
|
+
{
|
47
|
+
:'start' => :'String',
|
48
|
+
:'_end' => :'String',
|
49
|
+
:'downsample' => :'String',
|
50
|
+
:'metric' => :'String'
|
51
|
+
}
|
52
|
+
end
|
53
|
+
|
54
|
+
# List of attributes with nullable: true
|
55
|
+
def self.fastly_nullable
|
56
|
+
Set.new([
|
57
|
+
])
|
58
|
+
end
|
59
|
+
|
60
|
+
# Initializes the object
|
61
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
62
|
+
def initialize(attributes = {})
|
63
|
+
if (!attributes.is_a?(Hash))
|
64
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::HistoricalDdosMeta` initialize method"
|
65
|
+
end
|
66
|
+
|
67
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
68
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
69
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
70
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::HistoricalDdosMeta`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
71
|
+
end
|
72
|
+
h[k.to_sym] = v
|
73
|
+
}
|
74
|
+
|
75
|
+
if attributes.key?(:'start')
|
76
|
+
self.start = attributes[:'start']
|
77
|
+
end
|
78
|
+
|
79
|
+
if attributes.key?(:'_end')
|
80
|
+
self._end = attributes[:'_end']
|
81
|
+
end
|
82
|
+
|
83
|
+
if attributes.key?(:'downsample')
|
84
|
+
self.downsample = attributes[:'downsample']
|
85
|
+
end
|
86
|
+
|
87
|
+
if attributes.key?(:'metric')
|
88
|
+
self.metric = attributes[:'metric']
|
89
|
+
end
|
90
|
+
end
|
91
|
+
|
92
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
93
|
+
# @return Array for valid properties with the reasons
|
94
|
+
def list_invalid_properties
|
95
|
+
invalid_properties = Array.new
|
96
|
+
invalid_properties
|
97
|
+
end
|
98
|
+
|
99
|
+
# Check to see if the all the properties in the model are valid
|
100
|
+
# @return true if the model is valid
|
101
|
+
def valid?
|
102
|
+
true
|
103
|
+
end
|
104
|
+
|
105
|
+
# Checks equality by comparing each attribute.
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def ==(o)
|
108
|
+
return true if self.equal?(o)
|
109
|
+
self.class == o.class &&
|
110
|
+
start == o.start &&
|
111
|
+
_end == o._end &&
|
112
|
+
downsample == o.downsample &&
|
113
|
+
metric == o.metric
|
114
|
+
end
|
115
|
+
|
116
|
+
# @see the `==` method
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
def hash
|
125
|
+
[start, _end, downsample, metric].hash
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def self.build_from_hash(attributes)
|
132
|
+
new.build_from_hash(attributes)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def build_from_hash(attributes)
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
140
|
+
self.class.fastly_types.each_pair do |key, type|
|
141
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
|
142
|
+
self.send("#{key}=", nil)
|
143
|
+
elsif type =~ /\AArray<(.*)>/i
|
144
|
+
# check to ensure the input is an array given that the attribute
|
145
|
+
# is documented as an array but the input is not
|
146
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
147
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
148
|
+
end
|
149
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
150
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
151
|
+
end
|
152
|
+
end
|
153
|
+
|
154
|
+
self
|
155
|
+
end
|
156
|
+
|
157
|
+
# Deserializes the data based on type
|
158
|
+
# @param string type Data type
|
159
|
+
# @param string value Value to be deserialized
|
160
|
+
# @return [Object] Deserialized data
|
161
|
+
def _deserialize(type, value)
|
162
|
+
case type.to_sym
|
163
|
+
when :Time
|
164
|
+
Time.parse(value)
|
165
|
+
when :Date
|
166
|
+
Date.parse(value)
|
167
|
+
when :String
|
168
|
+
value.to_s
|
169
|
+
when :Integer
|
170
|
+
value.to_i
|
171
|
+
when :Float
|
172
|
+
value.to_f
|
173
|
+
when :Boolean
|
174
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
175
|
+
true
|
176
|
+
else
|
177
|
+
false
|
178
|
+
end
|
179
|
+
when :Object
|
180
|
+
# generic object (usually a Hash), return directly
|
181
|
+
value
|
182
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
183
|
+
inner_type = Regexp.last_match[:inner_type]
|
184
|
+
value.map { |v| _deserialize(inner_type, v) }
|
185
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
186
|
+
k_type = Regexp.last_match[:k_type]
|
187
|
+
v_type = Regexp.last_match[:v_type]
|
188
|
+
{}.tap do |hash|
|
189
|
+
value.each do |k, v|
|
190
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
191
|
+
end
|
192
|
+
end
|
193
|
+
else # model
|
194
|
+
# models (e.g. Pet) or oneOf
|
195
|
+
klass = Fastly.const_get(type)
|
196
|
+
klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
197
|
+
end
|
198
|
+
end
|
199
|
+
|
200
|
+
# Returns the string representation of the object
|
201
|
+
# @return [String] String presentation of the object
|
202
|
+
def to_s
|
203
|
+
to_hash.to_s
|
204
|
+
end
|
205
|
+
|
206
|
+
# to_body is an alias to to_hash (backward compatibility)
|
207
|
+
# @return [Hash] Returns the object in the form of hash
|
208
|
+
def to_body
|
209
|
+
to_hash
|
210
|
+
end
|
211
|
+
|
212
|
+
# Returns the object in the form of hash
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
214
|
+
def to_hash
|
215
|
+
hash = {}
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
217
|
+
value = self.send(attr)
|
218
|
+
if value.nil?
|
219
|
+
is_nullable = self.class.fastly_nullable.include?(attr)
|
220
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
221
|
+
end
|
222
|
+
|
223
|
+
hash[param] = _to_hash(value)
|
224
|
+
end
|
225
|
+
hash
|
226
|
+
end
|
227
|
+
|
228
|
+
# Outputs non-array value in the form of hash
|
229
|
+
# For object, use to_hash. Otherwise, just return the value
|
230
|
+
# @param [Object] value Any valid value
|
231
|
+
# @return [Hash] Returns the value in the form of hash
|
232
|
+
def _to_hash(value)
|
233
|
+
if value.is_a?(Array)
|
234
|
+
value.compact.map { |v| _to_hash(v) }
|
235
|
+
elsif value.is_a?(Hash)
|
236
|
+
{}.tap do |hash|
|
237
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
238
|
+
end
|
239
|
+
elsif value.respond_to? :to_hash
|
240
|
+
value.to_hash
|
241
|
+
else
|
242
|
+
value
|
243
|
+
end
|
244
|
+
end
|
245
|
+
|
246
|
+
end
|
247
|
+
|
248
|
+
end
|
@@ -661,6 +661,33 @@ module Fastly
|
|
661
661
|
# The number of times the blackhole action was taken. The blackhole action quietly closes a TCP connection without sending a reset. The blackhole action quietly closes a TCP connection without notifying its peer (all TCP state is dropped).
|
662
662
|
attr_accessor :ddos_action_blackhole
|
663
663
|
|
664
|
+
# The number of challenge-start tokens created.
|
665
|
+
attr_accessor :bot_challenge_starts
|
666
|
+
|
667
|
+
# The number of challenge-complete tokens that passed validation.
|
668
|
+
attr_accessor :bot_challenge_complete_tokens_passed
|
669
|
+
|
670
|
+
# The number of challenge-complete tokens that failed validation.
|
671
|
+
attr_accessor :bot_challenge_complete_tokens_failed
|
672
|
+
|
673
|
+
# The number of challenge-complete tokens checked.
|
674
|
+
attr_accessor :bot_challenge_complete_tokens_checked
|
675
|
+
|
676
|
+
# The number of challenge-complete tokens not checked because the feature was disabled.
|
677
|
+
attr_accessor :bot_challenge_complete_tokens_disabled
|
678
|
+
|
679
|
+
# The number of challenge-complete tokens issued. For example, issuing a challenge-complete token after a series of CAPTCHA challenges ending in success.
|
680
|
+
attr_accessor :bot_challenge_complete_tokens_issued
|
681
|
+
|
682
|
+
# The number of challenges issued. For example, the issuance of a CAPTCHA challenge.
|
683
|
+
attr_accessor :bot_challenges_issued
|
684
|
+
|
685
|
+
# The number of successful challenge solutions processed. For example, a correct CAPTCHA solution.
|
686
|
+
attr_accessor :bot_challenges_succeeded
|
687
|
+
|
688
|
+
# The number of failed challenge solutions processed. For example, an incorrect CAPTCHA solution.
|
689
|
+
attr_accessor :bot_challenges_failed
|
690
|
+
|
664
691
|
attr_accessor :service_id
|
665
692
|
|
666
693
|
attr_accessor :start_time
|
@@ -884,6 +911,15 @@ module Fastly
|
|
884
911
|
:'ddos_action_tarpit' => :'ddos_action_tarpit',
|
885
912
|
:'ddos_action_close' => :'ddos_action_close',
|
886
913
|
:'ddos_action_blackhole' => :'ddos_action_blackhole',
|
914
|
+
:'bot_challenge_starts' => :'bot_challenge_starts',
|
915
|
+
:'bot_challenge_complete_tokens_passed' => :'bot_challenge_complete_tokens_passed',
|
916
|
+
:'bot_challenge_complete_tokens_failed' => :'bot_challenge_complete_tokens_failed',
|
917
|
+
:'bot_challenge_complete_tokens_checked' => :'bot_challenge_complete_tokens_checked',
|
918
|
+
:'bot_challenge_complete_tokens_disabled' => :'bot_challenge_complete_tokens_disabled',
|
919
|
+
:'bot_challenge_complete_tokens_issued' => :'bot_challenge_complete_tokens_issued',
|
920
|
+
:'bot_challenges_issued' => :'bot_challenges_issued',
|
921
|
+
:'bot_challenges_succeeded' => :'bot_challenges_succeeded',
|
922
|
+
:'bot_challenges_failed' => :'bot_challenges_failed',
|
887
923
|
:'service_id' => :'service_id',
|
888
924
|
:'start_time' => :'start_time'
|
889
925
|
}
|
@@ -1113,6 +1149,15 @@ module Fastly
|
|
1113
1149
|
:'ddos_action_tarpit' => :'Integer',
|
1114
1150
|
:'ddos_action_close' => :'Integer',
|
1115
1151
|
:'ddos_action_blackhole' => :'Integer',
|
1152
|
+
:'bot_challenge_starts' => :'Integer',
|
1153
|
+
:'bot_challenge_complete_tokens_passed' => :'Integer',
|
1154
|
+
:'bot_challenge_complete_tokens_failed' => :'Integer',
|
1155
|
+
:'bot_challenge_complete_tokens_checked' => :'Integer',
|
1156
|
+
:'bot_challenge_complete_tokens_disabled' => :'Integer',
|
1157
|
+
:'bot_challenge_complete_tokens_issued' => :'Integer',
|
1158
|
+
:'bot_challenges_issued' => :'Integer',
|
1159
|
+
:'bot_challenges_succeeded' => :'Integer',
|
1160
|
+
:'bot_challenges_failed' => :'Integer',
|
1116
1161
|
:'service_id' => :'ReadOnlyIdService',
|
1117
1162
|
:'start_time' => :'Integer'
|
1118
1163
|
}
|
@@ -2012,6 +2057,42 @@ module Fastly
|
|
2012
2057
|
self.ddos_action_blackhole = attributes[:'ddos_action_blackhole']
|
2013
2058
|
end
|
2014
2059
|
|
2060
|
+
if attributes.key?(:'bot_challenge_starts')
|
2061
|
+
self.bot_challenge_starts = attributes[:'bot_challenge_starts']
|
2062
|
+
end
|
2063
|
+
|
2064
|
+
if attributes.key?(:'bot_challenge_complete_tokens_passed')
|
2065
|
+
self.bot_challenge_complete_tokens_passed = attributes[:'bot_challenge_complete_tokens_passed']
|
2066
|
+
end
|
2067
|
+
|
2068
|
+
if attributes.key?(:'bot_challenge_complete_tokens_failed')
|
2069
|
+
self.bot_challenge_complete_tokens_failed = attributes[:'bot_challenge_complete_tokens_failed']
|
2070
|
+
end
|
2071
|
+
|
2072
|
+
if attributes.key?(:'bot_challenge_complete_tokens_checked')
|
2073
|
+
self.bot_challenge_complete_tokens_checked = attributes[:'bot_challenge_complete_tokens_checked']
|
2074
|
+
end
|
2075
|
+
|
2076
|
+
if attributes.key?(:'bot_challenge_complete_tokens_disabled')
|
2077
|
+
self.bot_challenge_complete_tokens_disabled = attributes[:'bot_challenge_complete_tokens_disabled']
|
2078
|
+
end
|
2079
|
+
|
2080
|
+
if attributes.key?(:'bot_challenge_complete_tokens_issued')
|
2081
|
+
self.bot_challenge_complete_tokens_issued = attributes[:'bot_challenge_complete_tokens_issued']
|
2082
|
+
end
|
2083
|
+
|
2084
|
+
if attributes.key?(:'bot_challenges_issued')
|
2085
|
+
self.bot_challenges_issued = attributes[:'bot_challenges_issued']
|
2086
|
+
end
|
2087
|
+
|
2088
|
+
if attributes.key?(:'bot_challenges_succeeded')
|
2089
|
+
self.bot_challenges_succeeded = attributes[:'bot_challenges_succeeded']
|
2090
|
+
end
|
2091
|
+
|
2092
|
+
if attributes.key?(:'bot_challenges_failed')
|
2093
|
+
self.bot_challenges_failed = attributes[:'bot_challenges_failed']
|
2094
|
+
end
|
2095
|
+
|
2015
2096
|
if attributes.key?(:'service_id')
|
2016
2097
|
self.service_id = attributes[:'service_id']
|
2017
2098
|
end
|
@@ -2255,6 +2336,15 @@ module Fastly
|
|
2255
2336
|
ddos_action_tarpit == o.ddos_action_tarpit &&
|
2256
2337
|
ddos_action_close == o.ddos_action_close &&
|
2257
2338
|
ddos_action_blackhole == o.ddos_action_blackhole &&
|
2339
|
+
bot_challenge_starts == o.bot_challenge_starts &&
|
2340
|
+
bot_challenge_complete_tokens_passed == o.bot_challenge_complete_tokens_passed &&
|
2341
|
+
bot_challenge_complete_tokens_failed == o.bot_challenge_complete_tokens_failed &&
|
2342
|
+
bot_challenge_complete_tokens_checked == o.bot_challenge_complete_tokens_checked &&
|
2343
|
+
bot_challenge_complete_tokens_disabled == o.bot_challenge_complete_tokens_disabled &&
|
2344
|
+
bot_challenge_complete_tokens_issued == o.bot_challenge_complete_tokens_issued &&
|
2345
|
+
bot_challenges_issued == o.bot_challenges_issued &&
|
2346
|
+
bot_challenges_succeeded == o.bot_challenges_succeeded &&
|
2347
|
+
bot_challenges_failed == o.bot_challenges_failed &&
|
2258
2348
|
service_id == o.service_id &&
|
2259
2349
|
start_time == o.start_time
|
2260
2350
|
end
|
@@ -2268,7 +2358,7 @@ module Fastly
|
|
2268
2358
|
# Calculates hash code according to all attributes.
|
2269
2359
|
# @return [Integer] Hash code
|
2270
2360
|
def hash
|
2271
|
-
[requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, service_id, start_time].hash
|
2361
|
+
[requests, hits, hits_time, miss, miss_time, pass, pass_time, errors, restarts, hit_ratio, bandwidth, body_size, header_size, req_body_bytes, req_header_bytes, resp_body_bytes, resp_header_bytes, bereq_body_bytes, bereq_header_bytes, uncacheable, pipe, synth, tls, tls_v10, tls_v11, tls_v12, tls_v13, edge_requests, edge_resp_header_bytes, edge_resp_body_bytes, edge_hit_requests, edge_miss_requests, origin_fetches, origin_fetch_header_bytes, origin_fetch_body_bytes, origin_fetch_resp_header_bytes, origin_fetch_resp_body_bytes, origin_revalidations, origin_cache_fetches, shield, shield_resp_body_bytes, shield_resp_header_bytes, shield_fetches, shield_fetch_header_bytes, shield_fetch_body_bytes, shield_fetch_resp_header_bytes, shield_fetch_resp_body_bytes, shield_revalidations, shield_cache_fetches, ipv6, otfp, otfp_resp_body_bytes, otfp_resp_header_bytes, otfp_shield_resp_body_bytes, otfp_shield_resp_header_bytes, otfp_manifests, otfp_deliver_time, otfp_shield_time, video, pci, log, log_bytes, http2, http3, waf_logged, waf_blocked, waf_passed, attack_req_body_bytes, attack_req_header_bytes, attack_logged_req_body_bytes, attack_logged_req_header_bytes, attack_blocked_req_body_bytes, attack_blocked_req_header_bytes, attack_passed_req_body_bytes, attack_passed_req_header_bytes, attack_resp_synth_bytes, imgopto, imgopto_resp_body_bytes, imgopto_resp_header_bytes, imgopto_shield_resp_body_bytes, imgopto_shield_resp_header_bytes, imgvideo, imgvideo_frames, imgvideo_resp_header_bytes, imgvideo_resp_body_bytes, imgvideo_shield_resp_header_bytes, imgvideo_shield_resp_body_bytes, imgvideo_shield, imgvideo_shield_frames, status_200, status_204, status_206, status_301, status_302, status_304, status_400, status_401, status_403, status_404, status_406, status_416, status_429, status_500, status_501, status_502, status_503, status_504, status_505, status_1xx, status_2xx, status_3xx, status_4xx, status_5xx, object_size_1k, object_size_10k, object_size_100k, object_size_1m, object_size_10m, object_size_100m, object_size_1g, recv_sub_time, recv_sub_count, hash_sub_time, hash_sub_count, miss_sub_time, miss_sub_count, fetch_sub_time, fetch_sub_count, pass_sub_time, pass_sub_count, pipe_sub_time, pipe_sub_count, deliver_sub_time, deliver_sub_count, error_sub_time, error_sub_count, hit_sub_time, hit_sub_count, prehash_sub_time, prehash_sub_count, predeliver_sub_time, predeliver_sub_count, tls_handshake_sent_bytes, hit_resp_body_bytes, miss_resp_body_bytes, pass_resp_body_bytes, segblock_origin_fetches, segblock_shield_fetches, compute_requests, compute_request_time_ms, compute_request_time_billed_ms, compute_ram_used, compute_execution_time_ms, compute_req_header_bytes, compute_req_body_bytes, compute_resp_header_bytes, compute_resp_body_bytes, compute_resp_status_1xx, compute_resp_status_2xx, compute_resp_status_3xx, compute_resp_status_4xx, compute_resp_status_5xx, compute_bereq_header_bytes, compute_bereq_body_bytes, compute_beresp_header_bytes, compute_beresp_body_bytes, compute_bereqs, compute_bereq_errors, compute_resource_limit_exceeded, compute_heap_limit_exceeded, compute_stack_limit_exceeded, compute_globals_limit_exceeded, compute_guest_errors, compute_runtime_errors, edge_hit_resp_body_bytes, edge_hit_resp_header_bytes, edge_miss_resp_body_bytes, edge_miss_resp_header_bytes, origin_cache_fetch_resp_body_bytes, origin_cache_fetch_resp_header_bytes, shield_hit_requests, shield_miss_requests, shield_hit_resp_header_bytes, shield_hit_resp_body_bytes, shield_miss_resp_header_bytes, shield_miss_resp_body_bytes, websocket_req_header_bytes, websocket_req_body_bytes, websocket_resp_header_bytes, websocket_resp_body_bytes, websocket_bereq_header_bytes, websocket_bereq_body_bytes, websocket_beresp_header_bytes, websocket_beresp_body_bytes, websocket_conn_time_ms, fanout_recv_publishes, fanout_send_publishes, kv_store_class_a_operations, kv_store_class_b_operations, object_store_class_a_operations, object_store_class_b_operations, fanout_req_header_bytes, fanout_req_body_bytes, fanout_resp_header_bytes, fanout_resp_body_bytes, fanout_bereq_header_bytes, fanout_bereq_body_bytes, fanout_beresp_header_bytes, fanout_beresp_body_bytes, fanout_conn_time_ms, ddos_action_limit_streams_connections, ddos_action_limit_streams_requests, ddos_action_tarpit_accept, ddos_action_tarpit, ddos_action_close, ddos_action_blackhole, bot_challenge_starts, bot_challenge_complete_tokens_passed, bot_challenge_complete_tokens_failed, bot_challenge_complete_tokens_checked, bot_challenge_complete_tokens_disabled, bot_challenge_complete_tokens_issued, bot_challenges_issued, bot_challenges_succeeded, bot_challenges_failed, service_id, start_time].hash
|
2272
2362
|
end
|
2273
2363
|
|
2274
2364
|
# Builds the object from hash
|
@@ -16,7 +16,7 @@ module Fastly
|
|
16
16
|
# The port number.
|
17
17
|
attr_accessor :port
|
18
18
|
|
19
|
-
# Use token based authentication
|
19
|
+
# Use token based authentication.
|
20
20
|
attr_accessor :token
|
21
21
|
|
22
22
|
attr_accessor :use_tls
|
@@ -31,7 +31,7 @@ module Fastly
|
|
31
31
|
# The port number.
|
32
32
|
attr_accessor :port
|
33
33
|
|
34
|
-
# Use token based authentication
|
34
|
+
# Use token based authentication.
|
35
35
|
attr_accessor :token
|
36
36
|
|
37
37
|
attr_accessor :use_tls
|