Class: Falcon::DomainSsIoaExclusionsNewRuleRespV2
- Inherits:
-
Object
- Object
- Falcon::DomainSsIoaExclusionsNewRuleRespV2
- Defined in:
- lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb
Instance Attribute Summary collapse
-
#aid ⇒ Object
Returns the value of attribute aid.
-
#cl_regex ⇒ Object
Returns the value of attribute cl_regex.
-
#command_line ⇒ Object
Returns the value of attribute command_line.
-
#grandparent_cl_regex ⇒ Object
Returns the value of attribute grandparent_cl_regex.
-
#grandparent_command_line ⇒ Object
Returns the value of attribute grandparent_command_line.
-
#grandparent_ifn_regex ⇒ Object
Returns the value of attribute grandparent_ifn_regex.
-
#grandparent_image_file_name ⇒ Object
Returns the value of attribute grandparent_image_file_name.
-
#host_groups ⇒ Object
Returns the value of attribute host_groups.
-
#ifn_regex ⇒ Object
Returns the value of attribute ifn_regex.
-
#image_file_name ⇒ Object
Returns the value of attribute image_file_name.
-
#parent_cl_regex ⇒ Object
Returns the value of attribute parent_cl_regex.
-
#parent_command_line ⇒ Object
Returns the value of attribute parent_command_line.
-
#parent_ifn_regex ⇒ Object
Returns the value of attribute parent_ifn_regex.
-
#parent_image_file_name ⇒ Object
Returns the value of attribute parent_image_file_name.
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 = {}) ⇒ DomainSsIoaExclusionsNewRuleRespV2
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 = {}) ⇒ DomainSsIoaExclusionsNewRuleRespV2
Initializes the object
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 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 177 178 179 180 181 182 183 184 185 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 115 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::DomainSsIoaExclusionsNewRuleRespV2` 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::DomainSsIoaExclusionsNewRuleRespV2`. 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?(:'aid') self.aid = attributes[:'aid'] end if attributes.key?(:'cl_regex') self.cl_regex = attributes[:'cl_regex'] end if attributes.key?(:'command_line') self.command_line = attributes[:'command_line'] end if attributes.key?(:'grandparent_cl_regex') self.grandparent_cl_regex = attributes[:'grandparent_cl_regex'] end if attributes.key?(:'grandparent_command_line') self.grandparent_command_line = attributes[:'grandparent_command_line'] end if attributes.key?(:'grandparent_ifn_regex') self.grandparent_ifn_regex = attributes[:'grandparent_ifn_regex'] end if attributes.key?(:'grandparent_image_file_name') self.grandparent_image_file_name = attributes[:'grandparent_image_file_name'] end if attributes.key?(:'host_groups') if (value = attributes[:'host_groups']).is_a?(Array) self.host_groups = value end end if attributes.key?(:'ifn_regex') self.ifn_regex = attributes[:'ifn_regex'] end if attributes.key?(:'image_file_name') self.image_file_name = attributes[:'image_file_name'] end if attributes.key?(:'parent_cl_regex') self.parent_cl_regex = attributes[:'parent_cl_regex'] end if attributes.key?(:'parent_command_line') self.parent_command_line = attributes[:'parent_command_line'] end if attributes.key?(:'parent_ifn_regex') self.parent_ifn_regex = attributes[:'parent_ifn_regex'] end if attributes.key?(:'parent_image_file_name') self.parent_image_file_name = attributes[:'parent_image_file_name'] end end |
Instance Attribute Details
#aid ⇒ Object
Returns the value of attribute aid.
34 35 36 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 34 def aid @aid end |
#cl_regex ⇒ Object
Returns the value of attribute cl_regex.
36 37 38 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 36 def cl_regex @cl_regex end |
#command_line ⇒ Object
Returns the value of attribute command_line.
38 39 40 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 38 def command_line @command_line end |
#grandparent_cl_regex ⇒ Object
Returns the value of attribute grandparent_cl_regex.
40 41 42 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 40 def grandparent_cl_regex @grandparent_cl_regex end |
#grandparent_command_line ⇒ Object
Returns the value of attribute grandparent_command_line.
42 43 44 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 42 def grandparent_command_line @grandparent_command_line end |
#grandparent_ifn_regex ⇒ Object
Returns the value of attribute grandparent_ifn_regex.
44 45 46 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 44 def grandparent_ifn_regex @grandparent_ifn_regex end |
#grandparent_image_file_name ⇒ Object
Returns the value of attribute grandparent_image_file_name.
46 47 48 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 46 def grandparent_image_file_name @grandparent_image_file_name end |
#host_groups ⇒ Object
Returns the value of attribute host_groups.
48 49 50 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 48 def host_groups @host_groups end |
#ifn_regex ⇒ Object
Returns the value of attribute ifn_regex.
50 51 52 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 50 def ifn_regex @ifn_regex end |
#image_file_name ⇒ Object
Returns the value of attribute image_file_name.
52 53 54 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 52 def image_file_name @image_file_name end |
#parent_cl_regex ⇒ Object
Returns the value of attribute parent_cl_regex.
54 55 56 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 54 def parent_cl_regex @parent_cl_regex end |
#parent_command_line ⇒ Object
Returns the value of attribute parent_command_line.
56 57 58 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 56 def parent_command_line @parent_command_line end |
#parent_ifn_regex ⇒ Object
Returns the value of attribute parent_ifn_regex.
58 59 60 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 58 def parent_ifn_regex @parent_ifn_regex end |
#parent_image_file_name ⇒ Object
Returns the value of attribute parent_image_file_name.
60 61 62 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 60 def parent_image_file_name @parent_image_file_name end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
83 84 85 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 83 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 63 def self.attribute_map { :'aid' => :'aid', :'cl_regex' => :'cl_regex', :'command_line' => :'command_line', :'grandparent_cl_regex' => :'grandparent_cl_regex', :'grandparent_command_line' => :'grandparent_command_line', :'grandparent_ifn_regex' => :'grandparent_ifn_regex', :'grandparent_image_file_name' => :'grandparent_image_file_name', :'host_groups' => :'host_groups', :'ifn_regex' => :'ifn_regex', :'image_file_name' => :'image_file_name', :'parent_cl_regex' => :'parent_cl_regex', :'parent_command_line' => :'parent_command_line', :'parent_ifn_regex' => :'parent_ifn_regex', :'parent_image_file_name' => :'parent_image_file_name' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
271 272 273 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 271 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
108 109 110 111 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 108 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 88 def self.openapi_types { :'aid' => :'String', :'cl_regex' => :'String', :'command_line' => :'String', :'grandparent_cl_regex' => :'String', :'grandparent_command_line' => :'String', :'grandparent_ifn_regex' => :'String', :'grandparent_image_file_name' => :'String', :'host_groups' => :'Array<String>', :'ifn_regex' => :'String', :'image_file_name' => :'String', :'parent_cl_regex' => :'String', :'parent_command_line' => :'String', :'parent_ifn_regex' => :'String', :'parent_image_file_name' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 237 def ==(o) return true if self.equal?(o) self.class == o.class && aid == o.aid && cl_regex == o.cl_regex && command_line == o.command_line && grandparent_cl_regex == o.grandparent_cl_regex && grandparent_command_line == o.grandparent_command_line && grandparent_ifn_regex == o.grandparent_ifn_regex && grandparent_image_file_name == o.grandparent_image_file_name && host_groups == o.host_groups && ifn_regex == o.ifn_regex && image_file_name == o.image_file_name && parent_cl_regex == o.parent_cl_regex && parent_command_line == o.parent_command_line && parent_ifn_regex == o.parent_ifn_regex && parent_image_file_name == o.parent_image_file_name end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
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 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 302 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
373 374 375 376 377 378 379 380 381 382 383 384 385 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 373 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
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 278 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
258 259 260 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 258 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
264 265 266 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 264 def hash [aid, cl_regex, command_line, grandparent_cl_regex, grandparent_command_line, grandparent_ifn_regex, grandparent_image_file_name, host_groups, ifn_regex, image_file_name, parent_cl_regex, parent_command_line, parent_ifn_regex, parent_image_file_name].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 189 def list_invalid_properties invalid_properties = Array.new if @aid.nil? invalid_properties.push('invalid value for "aid", aid cannot be nil.') end if @command_line.nil? invalid_properties.push('invalid value for "command_line", command_line cannot be nil.') end if @grandparent_command_line.nil? invalid_properties.push('invalid value for "grandparent_command_line", grandparent_command_line cannot be nil.') end if @grandparent_image_file_name.nil? invalid_properties.push('invalid value for "grandparent_image_file_name", grandparent_image_file_name cannot be nil.') end if @image_file_name.nil? invalid_properties.push('invalid value for "image_file_name", image_file_name cannot be nil.') end if @parent_command_line.nil? invalid_properties.push('invalid value for "parent_command_line", parent_command_line cannot be nil.') end if @parent_image_file_name.nil? invalid_properties.push('invalid value for "parent_image_file_name", parent_image_file_name cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
349 350 351 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 349 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
355 356 357 358 359 360 361 362 363 364 365 366 367 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 355 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
343 344 345 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 343 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
224 225 226 227 228 229 230 231 232 233 |
# File 'lib/crimson-falcon/models/domain_ss_ioa_exclusions_new_rule_resp_v2.rb', line 224 def valid? return false if @aid.nil? return false if @command_line.nil? return false if @grandparent_command_line.nil? return false if @grandparent_image_file_name.nil? return false if @image_file_name.nil? return false if @parent_command_line.nil? return false if @parent_image_file_name.nil? true end |