Class: Fastly::WafFirewallVersionDataAttributes

Inherits:
Object
  • Object
show all
Defined in:
lib/fastly/models/waf_firewall_version_data_attributes.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ WafFirewallVersionDataAttributes

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 196

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::WafFirewallVersionDataAttributes` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `Fastly::WafFirewallVersionDataAttributes`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  if attributes.key?(:'allowed_http_versions')
    self.allowed_http_versions = attributes[:'allowed_http_versions']
  else
    self.allowed_http_versions = 'HTTP/1.0 HTTP/1.1 HTTP/2'
  end

  if attributes.key?(:'allowed_methods')
    self.allowed_methods = attributes[:'allowed_methods']
  else
    self.allowed_methods = 'GET HEAD POST OPTIONS PUT PATCH DELETE'
  end

  if attributes.key?(:'allowed_request_content_type')
    self.allowed_request_content_type = attributes[:'allowed_request_content_type']
  else
    self.allowed_request_content_type = 'application/x-www-form-urlencoded|multipart/form-data|text/xml|application/xml|application/x-amf|application/json|text/plain'
  end

  if attributes.key?(:'allowed_request_content_type_charset')
    self.allowed_request_content_type_charset = attributes[:'allowed_request_content_type_charset']
  else
    self.allowed_request_content_type_charset = 'utf-8|iso-8859-1|iso-8859-15|windows-1252'
  end

  if attributes.key?(:'arg_name_length')
    self.arg_name_length = attributes[:'arg_name_length']
  else
    self.arg_name_length = 100
  end

  if attributes.key?(:'arg_length')
    self.arg_length = attributes[:'arg_length']
  else
    self.arg_length = 400
  end

  if attributes.key?(:'combined_file_sizes')
    self.combined_file_sizes = attributes[:'combined_file_sizes']
  else
    self.combined_file_sizes = 10000000
  end

  if attributes.key?(:'comment')
    self.comment = attributes[:'comment']
  end

  if attributes.key?(:'critical_anomaly_score')
    self.critical_anomaly_score = attributes[:'critical_anomaly_score']
  else
    self.critical_anomaly_score = 6
  end

  if attributes.key?(:'crs_validate_utf8_encoding')
    self.crs_validate_utf8_encoding = attributes[:'crs_validate_utf8_encoding']
  end

  if attributes.key?(:'error_anomaly_score')
    self.error_anomaly_score = attributes[:'error_anomaly_score']
  else
    self.error_anomaly_score = 5
  end

  if attributes.key?(:'high_risk_country_codes')
    self.high_risk_country_codes = attributes[:'high_risk_country_codes']
  end

  if attributes.key?(:'http_violation_score_threshold')
    self.http_violation_score_threshold = attributes[:'http_violation_score_threshold']
  end

  if attributes.key?(:'inbound_anomaly_score_threshold')
    self.inbound_anomaly_score_threshold = attributes[:'inbound_anomaly_score_threshold']
  end

  if attributes.key?(:'lfi_score_threshold')
    self.lfi_score_threshold = attributes[:'lfi_score_threshold']
  end

  if attributes.key?(:'locked')
    self.locked = attributes[:'locked']
  else
    self.locked = false
  end

  if attributes.key?(:'max_file_size')
    self.max_file_size = attributes[:'max_file_size']
  else
    self.max_file_size = 10000000
  end

  if attributes.key?(:'max_num_args')
    self.max_num_args = attributes[:'max_num_args']
  else
    self.max_num_args = 255
  end

  if attributes.key?(:'notice_anomaly_score')
    self.notice_anomaly_score = attributes[:'notice_anomaly_score']
  else
    self.notice_anomaly_score = 4
  end

  if attributes.key?(:'number')
    self.number = attributes[:'number']
  end

  if attributes.key?(:'paranoia_level')
    self.paranoia_level = attributes[:'paranoia_level']
  else
    self.paranoia_level = 1
  end

  if attributes.key?(:'php_injection_score_threshold')
    self.php_injection_score_threshold = attributes[:'php_injection_score_threshold']
  end

  if attributes.key?(:'rce_score_threshold')
    self.rce_score_threshold = attributes[:'rce_score_threshold']
  end

  if attributes.key?(:'restricted_extensions')
    self.restricted_extensions = attributes[:'restricted_extensions']
  else
    self.restricted_extensions = '.asa/ .asax/ .ascx/ .axd/ .backup/ .bak/ .bat/ .cdx/ .cer/ .cfg/ .cmd/ .com/ .config/ .conf/ .cs/ .csproj/ .csr/ .dat/ .db/ .dbf/ .dll/ .dos/ .htr/ .htw/ .ida/ .idc/ .idq/ .inc/ .ini/ .key/ .licx/ .lnk/ .log/ .mdb/ .old/ .pass/ .pdb/ .pol/ .printer/ .pwd/ .resources/ .resx/ .sql/ .sys/ .vb/ .vbs/ .vbproj/ .vsdisco/ .webinfo/ .xsd/ .xsx'
  end

  if attributes.key?(:'restricted_headers')
    self.restricted_headers = attributes[:'restricted_headers']
  else
    self.restricted_headers = '/proxy/ /lock-token/ /content-range/ /translate/ /if/'
  end

  if attributes.key?(:'rfi_score_threshold')
    self.rfi_score_threshold = attributes[:'rfi_score_threshold']
  end

  if attributes.key?(:'session_fixation_score_threshold')
    self.session_fixation_score_threshold = attributes[:'session_fixation_score_threshold']
  end

  if attributes.key?(:'sql_injection_score_threshold')
    self.sql_injection_score_threshold = attributes[:'sql_injection_score_threshold']
  end

  if attributes.key?(:'total_arg_length')
    self.total_arg_length = attributes[:'total_arg_length']
  else
    self.total_arg_length = 6400
  end

  if attributes.key?(:'warning_anomaly_score')
    self.warning_anomaly_score = attributes[:'warning_anomaly_score']
  end

  if attributes.key?(:'xss_score_threshold')
    self.xss_score_threshold = attributes[:'xss_score_threshold']
  end
end

Instance Attribute Details

#allowed_http_versionsObject

Allowed HTTP versions.



17
18
19
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 17

def allowed_http_versions
  @allowed_http_versions
end

#allowed_methodsObject

A space-separated list of HTTP method names.



20
21
22
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 20

def allowed_methods
  @allowed_methods
end

#allowed_request_content_typeObject

Allowed request content types.



23
24
25
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 23

def allowed_request_content_type
  @allowed_request_content_type
end

#allowed_request_content_type_charsetObject

Allowed request content type charset.



26
27
28
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 26

def allowed_request_content_type_charset
  @allowed_request_content_type_charset
end

#arg_lengthObject

The maximum allowed length of an argument.



32
33
34
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 32

def arg_length
  @arg_length
end

#arg_name_lengthObject

The maximum allowed argument name length.



29
30
31
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 29

def arg_name_length
  @arg_name_length
end

#combined_file_sizesObject

The maximum allowed size of all files (in bytes).



35
36
37
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 35

def combined_file_sizes
  @combined_file_sizes
end

#commentObject

A freeform descriptive note.



38
39
40
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 38

def comment
  @comment
end

#critical_anomaly_scoreObject

Score value to add for critical anomalies.



41
42
43
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 41

def critical_anomaly_score
  @critical_anomaly_score
end

#crs_validate_utf8_encodingObject

CRS validate UTF8 encoding.



44
45
46
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 44

def crs_validate_utf8_encoding
  @crs_validate_utf8_encoding
end

#error_anomaly_scoreObject

Score value to add for error anomalies.



47
48
49
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 47

def error_anomaly_score
  @error_anomaly_score
end

#high_risk_country_codesObject

A space-separated list of country codes in ISO 3166-1 (two-letter) format.



50
51
52
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 50

def high_risk_country_codes
  @high_risk_country_codes
end

#http_violation_score_thresholdObject

HTTP violation threshold.



53
54
55
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 53

def http_violation_score_threshold
  @http_violation_score_threshold
end

#inbound_anomaly_score_thresholdObject

Inbound anomaly threshold.



56
57
58
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 56

def inbound_anomaly_score_threshold
  @inbound_anomaly_score_threshold
end

#lfi_score_thresholdObject

Local file inclusion attack threshold.



59
60
61
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 59

def lfi_score_threshold
  @lfi_score_threshold
end

#lockedObject

Whether a specific firewall version is locked from being modified.



62
63
64
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 62

def locked
  @locked
end

#max_file_sizeObject

The maximum allowed file size, in bytes.



65
66
67
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 65

def max_file_size
  @max_file_size
end

#max_num_argsObject

The maximum number of arguments allowed.



68
69
70
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 68

def max_num_args
  @max_num_args
end

#notice_anomaly_scoreObject

Score value to add for notice anomalies.



71
72
73
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 71

def notice_anomaly_score
  @notice_anomaly_score
end

#numberObject

Returns the value of attribute number.



73
74
75
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 73

def number
  @number
end

#paranoia_levelObject

The configured paranoia level.



76
77
78
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 76

def paranoia_level
  @paranoia_level
end

#php_injection_score_thresholdObject

PHP injection threshold.



79
80
81
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 79

def php_injection_score_threshold
  @php_injection_score_threshold
end

#rce_score_thresholdObject

Remote code execution threshold.



82
83
84
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 82

def rce_score_threshold
  @rce_score_threshold
end

#restricted_extensionsObject

A space-separated list of allowed file extensions.



85
86
87
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 85

def restricted_extensions
  @restricted_extensions
end

#restricted_headersObject

A space-separated list of allowed header names.



88
89
90
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 88

def restricted_headers
  @restricted_headers
end

#rfi_score_thresholdObject

Remote file inclusion attack threshold.



91
92
93
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 91

def rfi_score_threshold
  @rfi_score_threshold
end

#session_fixation_score_thresholdObject

Session fixation attack threshold.



94
95
96
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 94

def session_fixation_score_threshold
  @session_fixation_score_threshold
end

#sql_injection_score_thresholdObject

SQL injection attack threshold.



97
98
99
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 97

def sql_injection_score_threshold
  @sql_injection_score_threshold
end

#total_arg_lengthObject

The maximum size of argument names and values.



100
101
102
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 100

def total_arg_length
  @total_arg_length
end

#warning_anomaly_scoreObject

Score value to add for warning anomalies.



103
104
105
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 103

def warning_anomaly_score
  @warning_anomaly_score
end

#xss_score_thresholdObject

XSS attack threshold.



106
107
108
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 106

def xss_score_threshold
  @xss_score_threshold
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



146
147
148
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 146

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 109

def self.attribute_map
  {
    :'allowed_http_versions' => :'allowed_http_versions',
    :'allowed_methods' => :'allowed_methods',
    :'allowed_request_content_type' => :'allowed_request_content_type',
    :'allowed_request_content_type_charset' => :'allowed_request_content_type_charset',
    :'arg_name_length' => :'arg_name_length',
    :'arg_length' => :'arg_length',
    :'combined_file_sizes' => :'combined_file_sizes',
    :'comment' => :'comment',
    :'critical_anomaly_score' => :'critical_anomaly_score',
    :'crs_validate_utf8_encoding' => :'crs_validate_utf8_encoding',
    :'error_anomaly_score' => :'error_anomaly_score',
    :'high_risk_country_codes' => :'high_risk_country_codes',
    :'http_violation_score_threshold' => :'http_violation_score_threshold',
    :'inbound_anomaly_score_threshold' => :'inbound_anomaly_score_threshold',
    :'lfi_score_threshold' => :'lfi_score_threshold',
    :'locked' => :'locked',
    :'max_file_size' => :'max_file_size',
    :'max_num_args' => :'max_num_args',
    :'notice_anomaly_score' => :'notice_anomaly_score',
    :'number' => :'number',
    :'paranoia_level' => :'paranoia_level',
    :'php_injection_score_threshold' => :'php_injection_score_threshold',
    :'rce_score_threshold' => :'rce_score_threshold',
    :'restricted_extensions' => :'restricted_extensions',
    :'restricted_headers' => :'restricted_headers',
    :'rfi_score_threshold' => :'rfi_score_threshold',
    :'session_fixation_score_threshold' => :'session_fixation_score_threshold',
    :'sql_injection_score_threshold' => :'sql_injection_score_threshold',
    :'total_arg_length' => :'total_arg_length',
    :'warning_anomaly_score' => :'warning_anomaly_score',
    :'xss_score_threshold' => :'xss_score_threshold'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



434
435
436
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 434

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.fastly_nullableObject

List of attributes with nullable: true



188
189
190
191
192
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 188

def self.fastly_nullable
  Set.new([
    :'comment',
  ])
end

.fastly_typesObject

Attribute type mapping.



151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 151

def self.fastly_types
  {
    :'allowed_http_versions' => :'String',
    :'allowed_methods' => :'String',
    :'allowed_request_content_type' => :'String',
    :'allowed_request_content_type_charset' => :'String',
    :'arg_name_length' => :'Integer',
    :'arg_length' => :'Integer',
    :'combined_file_sizes' => :'Integer',
    :'comment' => :'String',
    :'critical_anomaly_score' => :'Integer',
    :'crs_validate_utf8_encoding' => :'Boolean',
    :'error_anomaly_score' => :'Integer',
    :'high_risk_country_codes' => :'String',
    :'http_violation_score_threshold' => :'Integer',
    :'inbound_anomaly_score_threshold' => :'Integer',
    :'lfi_score_threshold' => :'Integer',
    :'locked' => :'Boolean',
    :'max_file_size' => :'Integer',
    :'max_num_args' => :'Integer',
    :'notice_anomaly_score' => :'Integer',
    :'number' => :'Integer',
    :'paranoia_level' => :'Integer',
    :'php_injection_score_threshold' => :'Integer',
    :'rce_score_threshold' => :'Integer',
    :'restricted_extensions' => :'String',
    :'restricted_headers' => :'String',
    :'rfi_score_threshold' => :'Integer',
    :'session_fixation_score_threshold' => :'Integer',
    :'sql_injection_score_threshold' => :'Integer',
    :'total_arg_length' => :'Integer',
    :'warning_anomaly_score' => :'Integer',
    :'xss_score_threshold' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 383

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      allowed_http_versions == o.allowed_http_versions &&
      allowed_methods == o.allowed_methods &&
      allowed_request_content_type == o.allowed_request_content_type &&
      allowed_request_content_type_charset == o.allowed_request_content_type_charset &&
      arg_name_length == o.arg_name_length &&
      arg_length == o.arg_length &&
      combined_file_sizes == o.combined_file_sizes &&
      comment == o.comment &&
      critical_anomaly_score == o.critical_anomaly_score &&
      crs_validate_utf8_encoding == o.crs_validate_utf8_encoding &&
      error_anomaly_score == o.error_anomaly_score &&
      high_risk_country_codes == o.high_risk_country_codes &&
      http_violation_score_threshold == o.http_violation_score_threshold &&
      inbound_anomaly_score_threshold == o.inbound_anomaly_score_threshold &&
      lfi_score_threshold == o.lfi_score_threshold &&
      locked == o.locked &&
      max_file_size == o.max_file_size &&
      max_num_args == o.max_num_args &&
      notice_anomaly_score == o.notice_anomaly_score &&
      number == o.number &&
      paranoia_level == o.paranoia_level &&
      php_injection_score_threshold == o.php_injection_score_threshold &&
      rce_score_threshold == o.rce_score_threshold &&
      restricted_extensions == o.restricted_extensions &&
      restricted_headers == o.restricted_headers &&
      rfi_score_threshold == o.rfi_score_threshold &&
      session_fixation_score_threshold == o.session_fixation_score_threshold &&
      sql_injection_score_threshold == o.sql_injection_score_threshold &&
      total_arg_length == o.total_arg_length &&
      warning_anomaly_score == o.warning_anomaly_score &&
      xss_score_threshold == o.xss_score_threshold
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 464

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = Fastly.const_get(type)
    klass.respond_to?(:fastly_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



535
536
537
538
539
540
541
542
543
544
545
546
547
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 535

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 441

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.fastly_types.each_pair do |key, type|
    if attributes[self.class.attribute_map[key]].nil? && self.class.fastly_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


421
422
423
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 421

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



427
428
429
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 427

def hash
  [allowed_http_versions, allowed_methods, allowed_request_content_type, allowed_request_content_type_charset, arg_name_length, arg_length, combined_file_sizes, comment, critical_anomaly_score, crs_validate_utf8_encoding, error_anomaly_score, high_risk_country_codes, http_violation_score_threshold, inbound_anomaly_score_threshold, lfi_score_threshold, locked, max_file_size, max_num_args, notice_anomaly_score, number, paranoia_level, php_injection_score_threshold, rce_score_threshold, restricted_extensions, restricted_headers, rfi_score_threshold, session_fixation_score_threshold, sql_injection_score_threshold, total_arg_length, warning_anomaly_score, xss_score_threshold].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



370
371
372
373
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 370

def list_invalid_properties
  invalid_properties = Array.new
  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



511
512
513
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 511

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



517
518
519
520
521
522
523
524
525
526
527
528
529
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 517

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = self.class.fastly_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



505
506
507
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 505

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



377
378
379
# File 'lib/fastly/models/waf_firewall_version_data_attributes.rb', line 377

def valid?
  true
end