Class: Falcon::RulegroupsRule
- Inherits:
-
Object
- Object
- Falcon::RulegroupsRule
- Defined in:
- lib/crimson-falcon/models/rulegroups_rule.rb
Instance Attribute Summary collapse
-
#content_files ⇒ Object
Returns the value of attribute content_files.
-
#content_registry_values ⇒ Object
Returns the value of attribute content_registry_values.
-
#created_timestamp ⇒ Object
Returns the value of attribute created_timestamp.
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#description ⇒ Object
Returns the value of attribute description.
-
#enable_content_capture ⇒ Object
Returns the value of attribute enable_content_capture.
-
#exclude ⇒ Object
Returns the value of attribute exclude.
-
#exclude_processes ⇒ Object
Returns the value of attribute exclude_processes.
-
#exclude_users ⇒ Object
Returns the value of attribute exclude_users.
-
#id ⇒ Object
Returns the value of attribute id.
-
#include ⇒ Object
Returns the value of attribute include.
-
#include_processes ⇒ Object
Returns the value of attribute include_processes.
-
#include_users ⇒ Object
Returns the value of attribute include_users.
-
#modified_timestamp ⇒ Object
Returns the value of attribute modified_timestamp.
-
#path ⇒ Object
Returns the value of attribute path.
-
#precedence ⇒ Object
Returns the value of attribute precedence.
-
#rule_group_id ⇒ Object
Returns the value of attribute rule_group_id.
-
#severity ⇒ Object
Returns the value of attribute severity.
-
#type ⇒ Object
Returns the value of attribute type.
-
#watch_attributes_directory_changes ⇒ Object
Returns the value of attribute watch_attributes_directory_changes.
-
#watch_attributes_file_changes ⇒ Object
Returns the value of attribute watch_attributes_file_changes.
-
#watch_create_directory_changes ⇒ Object
Returns the value of attribute watch_create_directory_changes.
-
#watch_create_file_changes ⇒ Object
Returns the value of attribute watch_create_file_changes.
-
#watch_create_key_changes ⇒ Object
Returns the value of attribute watch_create_key_changes.
-
#watch_delete_directory_changes ⇒ Object
Returns the value of attribute watch_delete_directory_changes.
-
#watch_delete_file_changes ⇒ Object
Returns the value of attribute watch_delete_file_changes.
-
#watch_delete_key_changes ⇒ Object
Returns the value of attribute watch_delete_key_changes.
-
#watch_delete_value_changes ⇒ Object
Returns the value of attribute watch_delete_value_changes.
-
#watch_permissions_directory_changes ⇒ Object
Returns the value of attribute watch_permissions_directory_changes.
-
#watch_permissions_file_changes ⇒ Object
Returns the value of attribute watch_permissions_file_changes.
-
#watch_rename_directory_changes ⇒ Object
Returns the value of attribute watch_rename_directory_changes.
-
#watch_rename_file_changes ⇒ Object
Returns the value of attribute watch_rename_file_changes.
-
#watch_rename_key_changes ⇒ Object
Returns the value of attribute watch_rename_key_changes.
-
#watch_set_value_changes ⇒ Object
Returns the value of attribute watch_set_value_changes.
-
#watch_write_file_changes ⇒ Object
Returns the value of attribute watch_write_file_changes.
Class Method Summary collapse
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
-
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type.
-
#_to_hash(value) ⇒ Hash
Outputs non-array value in the form of hash For object, use to_hash.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ RulegroupsRule
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility).
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Constructor Details
#initialize(attributes = {}) ⇒ RulegroupsRule
Initializes the object
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 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 200 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::RulegroupsRule` 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 `Falcon::RulegroupsRule`. 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?(:'content_files') if (value = attributes[:'content_files']).is_a?(Array) self.content_files = value end end if attributes.key?(:'content_registry_values') if (value = attributes[:'content_registry_values']).is_a?(Array) self.content_registry_values = value end end if attributes.key?(:'created_timestamp') self. = attributes[:'created_timestamp'] end if attributes.key?(:'depth') self.depth = attributes[:'depth'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'enable_content_capture') self.enable_content_capture = attributes[:'enable_content_capture'] end if attributes.key?(:'exclude') self.exclude = attributes[:'exclude'] end if attributes.key?(:'exclude_processes') self.exclude_processes = attributes[:'exclude_processes'] end if attributes.key?(:'exclude_users') self.exclude_users = attributes[:'exclude_users'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'include') self.include = attributes[:'include'] end if attributes.key?(:'include_processes') self.include_processes = attributes[:'include_processes'] end if attributes.key?(:'include_users') self.include_users = attributes[:'include_users'] end if attributes.key?(:'modified_timestamp') self. = attributes[:'modified_timestamp'] end if attributes.key?(:'path') self.path = attributes[:'path'] end if attributes.key?(:'precedence') self.precedence = attributes[:'precedence'] end if attributes.key?(:'rule_group_id') self.rule_group_id = attributes[:'rule_group_id'] end if attributes.key?(:'severity') self.severity = attributes[:'severity'] end if attributes.key?(:'type') self.type = attributes[:'type'] end if attributes.key?(:'watch_attributes_directory_changes') self.watch_attributes_directory_changes = attributes[:'watch_attributes_directory_changes'] end if attributes.key?(:'watch_attributes_file_changes') self.watch_attributes_file_changes = attributes[:'watch_attributes_file_changes'] end if attributes.key?(:'watch_create_directory_changes') self.watch_create_directory_changes = attributes[:'watch_create_directory_changes'] end if attributes.key?(:'watch_create_file_changes') self.watch_create_file_changes = attributes[:'watch_create_file_changes'] end if attributes.key?(:'watch_create_key_changes') self.watch_create_key_changes = attributes[:'watch_create_key_changes'] end if attributes.key?(:'watch_delete_directory_changes') self.watch_delete_directory_changes = attributes[:'watch_delete_directory_changes'] end if attributes.key?(:'watch_delete_file_changes') self.watch_delete_file_changes = attributes[:'watch_delete_file_changes'] end if attributes.key?(:'watch_delete_key_changes') self.watch_delete_key_changes = attributes[:'watch_delete_key_changes'] end if attributes.key?(:'watch_delete_value_changes') self.watch_delete_value_changes = attributes[:'watch_delete_value_changes'] end if attributes.key?(:'watch_permissions_directory_changes') self. = attributes[:'watch_permissions_directory_changes'] end if attributes.key?(:'watch_permissions_file_changes') self. = attributes[:'watch_permissions_file_changes'] end if attributes.key?(:'watch_rename_directory_changes') self.watch_rename_directory_changes = attributes[:'watch_rename_directory_changes'] end if attributes.key?(:'watch_rename_file_changes') self.watch_rename_file_changes = attributes[:'watch_rename_file_changes'] end if attributes.key?(:'watch_rename_key_changes') self.watch_rename_key_changes = attributes[:'watch_rename_key_changes'] end if attributes.key?(:'watch_set_value_changes') self.watch_set_value_changes = attributes[:'watch_set_value_changes'] end if attributes.key?(:'watch_write_file_changes') self.watch_write_file_changes = attributes[:'watch_write_file_changes'] end end |
Instance Attribute Details
#content_files ⇒ Object
Returns the value of attribute content_files.
35 36 37 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 35 def content_files @content_files end |
#content_registry_values ⇒ Object
Returns the value of attribute content_registry_values.
37 38 39 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 37 def content_registry_values @content_registry_values end |
#created_timestamp ⇒ Object
Returns the value of attribute created_timestamp.
39 40 41 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 39 def @created_timestamp end |
#depth ⇒ Object
Returns the value of attribute depth.
41 42 43 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 41 def depth @depth end |
#description ⇒ Object
Returns the value of attribute description.
43 44 45 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 43 def description @description end |
#enable_content_capture ⇒ Object
Returns the value of attribute enable_content_capture.
45 46 47 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 45 def enable_content_capture @enable_content_capture end |
#exclude ⇒ Object
Returns the value of attribute exclude.
47 48 49 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 47 def exclude @exclude end |
#exclude_processes ⇒ Object
Returns the value of attribute exclude_processes.
49 50 51 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 49 def exclude_processes @exclude_processes end |
#exclude_users ⇒ Object
Returns the value of attribute exclude_users.
51 52 53 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 51 def exclude_users @exclude_users end |
#id ⇒ Object
Returns the value of attribute id.
53 54 55 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 53 def id @id end |
#include ⇒ Object
Returns the value of attribute include.
55 56 57 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 55 def include @include end |
#include_processes ⇒ Object
Returns the value of attribute include_processes.
57 58 59 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 57 def include_processes @include_processes end |
#include_users ⇒ Object
Returns the value of attribute include_users.
59 60 61 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 59 def include_users @include_users end |
#modified_timestamp ⇒ Object
Returns the value of attribute modified_timestamp.
61 62 63 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 61 def @modified_timestamp end |
#path ⇒ Object
Returns the value of attribute path.
63 64 65 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 63 def path @path end |
#precedence ⇒ Object
Returns the value of attribute precedence.
65 66 67 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 65 def precedence @precedence end |
#rule_group_id ⇒ Object
Returns the value of attribute rule_group_id.
67 68 69 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 67 def rule_group_id @rule_group_id end |
#severity ⇒ Object
Returns the value of attribute severity.
69 70 71 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 69 def severity @severity end |
#type ⇒ Object
Returns the value of attribute type.
71 72 73 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 71 def type @type end |
#watch_attributes_directory_changes ⇒ Object
Returns the value of attribute watch_attributes_directory_changes.
73 74 75 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 73 def watch_attributes_directory_changes @watch_attributes_directory_changes end |
#watch_attributes_file_changes ⇒ Object
Returns the value of attribute watch_attributes_file_changes.
75 76 77 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 75 def watch_attributes_file_changes @watch_attributes_file_changes end |
#watch_create_directory_changes ⇒ Object
Returns the value of attribute watch_create_directory_changes.
77 78 79 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 77 def watch_create_directory_changes @watch_create_directory_changes end |
#watch_create_file_changes ⇒ Object
Returns the value of attribute watch_create_file_changes.
79 80 81 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 79 def watch_create_file_changes @watch_create_file_changes end |
#watch_create_key_changes ⇒ Object
Returns the value of attribute watch_create_key_changes.
81 82 83 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 81 def watch_create_key_changes @watch_create_key_changes end |
#watch_delete_directory_changes ⇒ Object
Returns the value of attribute watch_delete_directory_changes.
83 84 85 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 83 def watch_delete_directory_changes @watch_delete_directory_changes end |
#watch_delete_file_changes ⇒ Object
Returns the value of attribute watch_delete_file_changes.
85 86 87 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 85 def watch_delete_file_changes @watch_delete_file_changes end |
#watch_delete_key_changes ⇒ Object
Returns the value of attribute watch_delete_key_changes.
87 88 89 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 87 def watch_delete_key_changes @watch_delete_key_changes end |
#watch_delete_value_changes ⇒ Object
Returns the value of attribute watch_delete_value_changes.
89 90 91 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 89 def watch_delete_value_changes @watch_delete_value_changes end |
#watch_permissions_directory_changes ⇒ Object
Returns the value of attribute watch_permissions_directory_changes.
91 92 93 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 91 def @watch_permissions_directory_changes end |
#watch_permissions_file_changes ⇒ Object
Returns the value of attribute watch_permissions_file_changes.
93 94 95 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 93 def @watch_permissions_file_changes end |
#watch_rename_directory_changes ⇒ Object
Returns the value of attribute watch_rename_directory_changes.
95 96 97 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 95 def watch_rename_directory_changes @watch_rename_directory_changes end |
#watch_rename_file_changes ⇒ Object
Returns the value of attribute watch_rename_file_changes.
97 98 99 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 97 def watch_rename_file_changes @watch_rename_file_changes end |
#watch_rename_key_changes ⇒ Object
Returns the value of attribute watch_rename_key_changes.
99 100 101 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 99 def watch_rename_key_changes @watch_rename_key_changes end |
#watch_set_value_changes ⇒ Object
Returns the value of attribute watch_set_value_changes.
101 102 103 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 101 def watch_set_value_changes @watch_set_value_changes end |
#watch_write_file_changes ⇒ Object
Returns the value of attribute watch_write_file_changes.
103 104 105 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 103 def watch_write_file_changes @watch_write_file_changes end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
147 148 149 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 147 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 137 138 139 140 141 142 143 144 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 106 def self.attribute_map { :'content_files' => :'content_files', :'content_registry_values' => :'content_registry_values', :'created_timestamp' => :'created_timestamp', :'depth' => :'depth', :'description' => :'description', :'enable_content_capture' => :'enable_content_capture', :'exclude' => :'exclude', :'exclude_processes' => :'exclude_processes', :'exclude_users' => :'exclude_users', :'id' => :'id', :'include' => :'include', :'include_processes' => :'include_processes', :'include_users' => :'include_users', :'modified_timestamp' => :'modified_timestamp', :'path' => :'path', :'precedence' => :'precedence', :'rule_group_id' => :'rule_group_id', :'severity' => :'severity', :'type' => :'type', :'watch_attributes_directory_changes' => :'watch_attributes_directory_changes', :'watch_attributes_file_changes' => :'watch_attributes_file_changes', :'watch_create_directory_changes' => :'watch_create_directory_changes', :'watch_create_file_changes' => :'watch_create_file_changes', :'watch_create_key_changes' => :'watch_create_key_changes', :'watch_delete_directory_changes' => :'watch_delete_directory_changes', :'watch_delete_file_changes' => :'watch_delete_file_changes', :'watch_delete_key_changes' => :'watch_delete_key_changes', :'watch_delete_value_changes' => :'watch_delete_value_changes', :'watch_permissions_directory_changes' => :'watch_permissions_directory_changes', :'watch_permissions_file_changes' => :'watch_permissions_file_changes', :'watch_rename_directory_changes' => :'watch_rename_directory_changes', :'watch_rename_file_changes' => :'watch_rename_file_changes', :'watch_rename_key_changes' => :'watch_rename_key_changes', :'watch_set_value_changes' => :'watch_set_value_changes', :'watch_write_file_changes' => :'watch_write_file_changes' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
463 464 465 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 463 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
193 194 195 196 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 193 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
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 186 187 188 189 190 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 152 def self.openapi_types { :'content_files' => :'Array<String>', :'content_registry_values' => :'Array<String>', :'created_timestamp' => :'String', :'depth' => :'String', :'description' => :'String', :'enable_content_capture' => :'Boolean', :'exclude' => :'String', :'exclude_processes' => :'String', :'exclude_users' => :'String', :'id' => :'String', :'include' => :'String', :'include_processes' => :'String', :'include_users' => :'String', :'modified_timestamp' => :'String', :'path' => :'String', :'precedence' => :'Integer', :'rule_group_id' => :'String', :'severity' => :'String', :'type' => :'String', :'watch_attributes_directory_changes' => :'Boolean', :'watch_attributes_file_changes' => :'Boolean', :'watch_create_directory_changes' => :'Boolean', :'watch_create_file_changes' => :'Boolean', :'watch_create_key_changes' => :'Boolean', :'watch_delete_directory_changes' => :'Boolean', :'watch_delete_file_changes' => :'Boolean', :'watch_delete_key_changes' => :'Boolean', :'watch_delete_value_changes' => :'Boolean', :'watch_permissions_directory_changes' => :'Boolean', :'watch_permissions_file_changes' => :'Boolean', :'watch_rename_directory_changes' => :'Boolean', :'watch_rename_file_changes' => :'Boolean', :'watch_rename_key_changes' => :'Boolean', :'watch_set_value_changes' => :'Boolean', :'watch_write_file_changes' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 408 def ==(o) return true if self.equal?(o) self.class == o.class && content_files == o.content_files && content_registry_values == o.content_registry_values && == o. && depth == o.depth && description == o.description && enable_content_capture == o.enable_content_capture && exclude == o.exclude && exclude_processes == o.exclude_processes && exclude_users == o.exclude_users && id == o.id && include == o.include && include_processes == o.include_processes && include_users == o.include_users && == o. && path == o.path && precedence == o.precedence && rule_group_id == o.rule_group_id && severity == o.severity && type == o.type && watch_attributes_directory_changes == o.watch_attributes_directory_changes && watch_attributes_file_changes == o.watch_attributes_file_changes && watch_create_directory_changes == o.watch_create_directory_changes && watch_create_file_changes == o.watch_create_file_changes && watch_create_key_changes == o.watch_create_key_changes && watch_delete_directory_changes == o.watch_delete_directory_changes && watch_delete_file_changes == o.watch_delete_file_changes && watch_delete_key_changes == o.watch_delete_key_changes && watch_delete_value_changes == o.watch_delete_value_changes && == o. && == o. && watch_rename_directory_changes == o.watch_rename_directory_changes && watch_rename_file_changes == o.watch_rename_file_changes && watch_rename_key_changes == o.watch_rename_key_changes && watch_set_value_changes == o.watch_set_value_changes && watch_write_file_changes == o.watch_write_file_changes end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 494 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 = Falcon.const_get(type) klass.respond_to?(:openapi_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
565 566 567 568 569 570 571 572 573 574 575 576 577 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 565 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
470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 470 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) self.class.openapi_types.each_pair do |key, type| if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_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
450 451 452 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 450 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
456 457 458 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 456 def hash [content_files, content_registry_values, , depth, description, enable_content_capture, exclude, exclude_processes, exclude_users, id, include, include_processes, include_users, , path, precedence, rule_group_id, severity, type, watch_attributes_directory_changes, watch_attributes_file_changes, watch_create_directory_changes, watch_create_file_changes, watch_create_key_changes, watch_delete_directory_changes, watch_delete_file_changes, watch_delete_key_changes, watch_delete_value_changes, , , watch_rename_directory_changes, watch_rename_file_changes, watch_rename_key_changes, watch_set_value_changes, watch_write_file_changes].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
360 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 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 360 def list_invalid_properties invalid_properties = Array.new if @depth.nil? invalid_properties.push('invalid value for "depth", depth cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @include.nil? invalid_properties.push('invalid value for "include", include cannot be nil.') end if @path.nil? invalid_properties.push('invalid value for "path", path cannot be nil.') end if @rule_group_id.nil? invalid_properties.push('invalid value for "rule_group_id", rule_group_id cannot be nil.') end if @severity.nil? invalid_properties.push('invalid value for "severity", severity cannot be nil.') end if @type.nil? invalid_properties.push('invalid value for "type", type cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
541 542 543 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 541 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
547 548 549 550 551 552 553 554 555 556 557 558 559 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 547 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
535 536 537 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 535 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
395 396 397 398 399 400 401 402 403 404 |
# File 'lib/crimson-falcon/models/rulegroups_rule.rb', line 395 def valid? return false if @depth.nil? return false if @id.nil? return false if @include.nil? return false if @path.nil? return false if @rule_group_id.nil? return false if @severity.nil? return false if @type.nil? true end |