Class: Fastly::LegacyWafOwasp

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

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ LegacyWafOwasp

Initializes the object

Parameters:

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

    Model attributes in the form of hash



186
187
188
189
190
191
192
193
194
195
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
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 186

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `Fastly::LegacyWafOwasp` 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::LegacyWafOwasp`. 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?(:'arg_length')
    self.arg_length = attributes[:'arg_length']
  else
    self.arg_length = 400
  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?(:'combined_file_sizes')
    self.combined_file_sizes = attributes[:'combined_file_sizes']
  else
    self.combined_file_sizes = 10000000
  end

  if attributes.key?(:'created_at')
    self.created_at = attributes[:'created_at']
  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?(:'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?(:'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?(:'updated_at')
    self.updated_at = attributes[:'updated_at']
  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/legacy_waf_owasp.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/legacy_waf_owasp.rb', line 20

def allowed_methods
  @allowed_methods
end

#allowed_request_content_typeObject

Allowed request content types.



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

def allowed_request_content_type
  @allowed_request_content_type
end

#arg_lengthObject

The maximum allowed length of an argument.



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

def arg_length
  @arg_length
end

#arg_name_lengthObject

The maximum allowed argument name length.



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

def arg_name_length
  @arg_name_length
end

#combined_file_sizesObject

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



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

def combined_file_sizes
  @combined_file_sizes
end

#created_atObject

Date and time that the settings object was created.



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

def created_at
  @created_at
end

#critical_anomaly_scoreObject

Score value to add for critical anomalies.



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

def critical_anomaly_score
  @critical_anomaly_score
end

#crs_validate_utf8_encodingObject

CRS validate UTF8 encoding.



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

def crs_validate_utf8_encoding
  @crs_validate_utf8_encoding
end

#error_anomaly_scoreObject

Score value to add for error anomalies.



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

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.



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

def high_risk_country_codes
  @high_risk_country_codes
end

#http_violation_score_thresholdObject

HTTP violation threshold.



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

def http_violation_score_threshold
  @http_violation_score_threshold
end

#inbound_anomaly_score_thresholdObject

Inbound anomaly threshold.



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

def inbound_anomaly_score_threshold
  @inbound_anomaly_score_threshold
end

#lfi_score_thresholdObject

Local file inclusion attack threshold.



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

def lfi_score_threshold
  @lfi_score_threshold
end

#max_file_sizeObject

The maximum allowed file size (in bytes).



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

def max_file_size
  @max_file_size
end

#max_num_argsObject

The maximum number of arguments allowed.



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

def max_num_args
  @max_num_args
end

#notice_anomaly_scoreObject

Score value to add for notice anomalies.



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

def notice_anomaly_score
  @notice_anomaly_score
end

#paranoia_levelObject

The configured paranoia level.



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

def paranoia_level
  @paranoia_level
end

#php_injection_score_thresholdObject

PHP injection threshold.



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

def php_injection_score_threshold
  @php_injection_score_threshold
end

#rce_score_thresholdObject

Remote code execution threshold.



74
75
76
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 74

def rce_score_threshold
  @rce_score_threshold
end

#restricted_extensionsObject

A space-separated list of disallowed file extensions.



77
78
79
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 77

def restricted_extensions
  @restricted_extensions
end

#restricted_headersObject

A space-separated list of disallowed header names.



80
81
82
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 80

def restricted_headers
  @restricted_headers
end

#rfi_score_thresholdObject

Remote file inclusion attack threshold.



83
84
85
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 83

def rfi_score_threshold
  @rfi_score_threshold
end

#session_fixation_score_thresholdObject

Session fixation attack threshold.



86
87
88
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 86

def session_fixation_score_threshold
  @session_fixation_score_threshold
end

#sql_injection_score_thresholdObject

SQL injection attack threshold.



89
90
91
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 89

def sql_injection_score_threshold
  @sql_injection_score_threshold
end

#total_arg_lengthObject

The maximum size of argument names and values.



92
93
94
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 92

def total_arg_length
  @total_arg_length
end

#updated_atObject

Date and time that the settings object was last updated.



95
96
97
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 95

def updated_at
  @updated_at
end

#warning_anomaly_scoreObject

Score value to add for warning anomalies.



98
99
100
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 98

def warning_anomaly_score
  @warning_anomaly_score
end

#xss_score_thresholdObject

XSS attack threshold.



101
102
103
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 101

def xss_score_threshold
  @xss_score_threshold
end

Class Method Details

.acceptable_attributesObject

Returns all the JSON keys this model knows about



139
140
141
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 139

def self.acceptable_attributes
  attribute_map.values
end

.attribute_mapObject

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



104
105
106
107
108
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
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 104

def self.attribute_map
  {
    :'allowed_http_versions' => :'allowed_http_versions',
    :'allowed_methods' => :'allowed_methods',
    :'allowed_request_content_type' => :'allowed_request_content_type',
    :'arg_length' => :'arg_length',
    :'arg_name_length' => :'arg_name_length',
    :'combined_file_sizes' => :'combined_file_sizes',
    :'created_at' => :'created_at',
    :'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',
    :'max_file_size' => :'max_file_size',
    :'max_num_args' => :'max_num_args',
    :'notice_anomaly_score' => :'notice_anomaly_score',
    :'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',
    :'updated_at' => :'updated_at',
    :'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



410
411
412
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 410

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

.fastly_nullableObject

List of attributes with nullable: true



179
180
181
182
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 179

def self.fastly_nullable
  Set.new([
  ])
end

.fastly_typesObject

Attribute type mapping.



144
145
146
147
148
149
150
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
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 144

def self.fastly_types
  {
    :'allowed_http_versions' => :'String',
    :'allowed_methods' => :'String',
    :'allowed_request_content_type' => :'String',
    :'arg_length' => :'Integer',
    :'arg_name_length' => :'Integer',
    :'combined_file_sizes' => :'Integer',
    :'created_at' => :'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',
    :'max_file_size' => :'Integer',
    :'max_num_args' => :'Integer',
    :'notice_anomaly_score' => :'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',
    :'updated_at' => :'String',
    :'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



361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 361

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 &&
      arg_length == o.arg_length &&
      arg_name_length == o.arg_name_length &&
      combined_file_sizes == o.combined_file_sizes &&
      created_at == o.created_at &&
      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 &&
      max_file_size == o.max_file_size &&
      max_num_args == o.max_num_args &&
      notice_anomaly_score == o.notice_anomaly_score &&
      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 &&
      updated_at == o.updated_at &&
      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



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 440

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



511
512
513
514
515
516
517
518
519
520
521
522
523
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 511

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



417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 417

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


397
398
399
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 397

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



403
404
405
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 403

def hash
  [allowed_http_versions, allowed_methods, allowed_request_content_type, arg_length, arg_name_length, combined_file_sizes, created_at, 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, max_file_size, max_num_args, notice_anomaly_score, 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, updated_at, 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



348
349
350
351
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 348

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



487
488
489
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 487

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



493
494
495
496
497
498
499
500
501
502
503
504
505
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 493

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



481
482
483
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 481

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



355
356
357
# File 'lib/fastly/models/legacy_waf_owasp.rb', line 355

def valid?
  true
end