Class: Falcon::PolicymanagerExternalRule
- Inherits:
-
Object
- Object
- Falcon::PolicymanagerExternalRule
- Defined in:
- lib/crimson-falcon/models/policymanager_external_rule.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#ad_groups ⇒ Object
Returns the value of attribute ad_groups.
-
#ad_users ⇒ Object
Returns the value of attribute ad_users.
-
#created_time_stamp ⇒ Object
Returns the value of attribute created_time_stamp.
-
#description ⇒ Object
Returns the value of attribute description.
-
#detection_severity ⇒ Object
Accepts values: ‘informational’, ‘low’, ‘medium’, ‘high’, ‘critical’.
-
#enable_local_application_groups ⇒ Object
Returns the value of attribute enable_local_application_groups.
-
#enable_printer_egress ⇒ Object
Warning(Windows): Filepath, file type and sensitivity label conditions are not supported.
-
#enable_screen_capture_rule ⇒ Object
Enable screen capture for this rule, the policy this classification is attached to should have screen capture enabled as a prerequisite.
-
#enable_usb_devices ⇒ Object
Warning: File path conditions are partially supported; file name and extension matching only; full file paths are not supported.
-
#enable_web_locations ⇒ Object
Returns the value of attribute enable_web_locations.
-
#id ⇒ Object
Returns the value of attribute id.
-
#local_application_groups ⇒ Object
List of local application groups.
-
#modified_time_stamp ⇒ Object
Returns the value of attribute modified_time_stamp.
-
#notify_end_user ⇒ Object
Returns the value of attribute notify_end_user.
-
#response_action ⇒ Object
Accepts values: ‘allow’, ‘block’, ‘justify’.
-
#trigger_detection ⇒ Object
Returns the value of attribute trigger_detection.
-
#user_scope ⇒ Object
Accepts values: ‘all’, ‘specific’.
-
#web_locations ⇒ Object
Returns the value of attribute web_locations.
-
#web_locations_scope ⇒ Object
Accepts values: ‘all’, ‘specific’.
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 = {}) ⇒ PolicymanagerExternalRule
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 = {}) ⇒ PolicymanagerExternalRule
Initializes the object
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 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 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 165 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Falcon::PolicymanagerExternalRule` 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::PolicymanagerExternalRule`. 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?(:'ad_groups') if (value = attributes[:'ad_groups']).is_a?(Array) self.ad_groups = value end end if attributes.key?(:'ad_users') if (value = attributes[:'ad_users']).is_a?(Array) self.ad_users = value end end if attributes.key?(:'created_time_stamp') self.created_time_stamp = attributes[:'created_time_stamp'] end if attributes.key?(:'description') self.description = attributes[:'description'] end if attributes.key?(:'detection_severity') self.detection_severity = attributes[:'detection_severity'] end if attributes.key?(:'enable_local_application_groups') self.enable_local_application_groups = attributes[:'enable_local_application_groups'] end if attributes.key?(:'enable_printer_egress') self.enable_printer_egress = attributes[:'enable_printer_egress'] end if attributes.key?(:'enable_screen_capture_rule') self.enable_screen_capture_rule = attributes[:'enable_screen_capture_rule'] end if attributes.key?(:'enable_usb_devices') self.enable_usb_devices = attributes[:'enable_usb_devices'] end if attributes.key?(:'enable_web_locations') self.enable_web_locations = attributes[:'enable_web_locations'] end if attributes.key?(:'id') self.id = attributes[:'id'] end if attributes.key?(:'local_application_groups') if (value = attributes[:'local_application_groups']).is_a?(Array) self.local_application_groups = value end end if attributes.key?(:'modified_time_stamp') self.modified_time_stamp = attributes[:'modified_time_stamp'] end if attributes.key?(:'notify_end_user') self.notify_end_user = attributes[:'notify_end_user'] end if attributes.key?(:'response_action') self.response_action = attributes[:'response_action'] end if attributes.key?(:'trigger_detection') self.trigger_detection = attributes[:'trigger_detection'] end if attributes.key?(:'user_scope') self.user_scope = attributes[:'user_scope'] end if attributes.key?(:'web_locations') if (value = attributes[:'web_locations']).is_a?(Array) self.web_locations = value end end if attributes.key?(:'web_locations_scope') self.web_locations_scope = attributes[:'web_locations_scope'] end end |
Instance Attribute Details
#ad_groups ⇒ Object
Returns the value of attribute ad_groups.
34 35 36 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 34 def ad_groups @ad_groups end |
#ad_users ⇒ Object
Returns the value of attribute ad_users.
36 37 38 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 36 def ad_users @ad_users end |
#created_time_stamp ⇒ Object
Returns the value of attribute created_time_stamp.
38 39 40 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 38 def created_time_stamp @created_time_stamp end |
#description ⇒ Object
Returns the value of attribute description.
40 41 42 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 40 def description @description end |
#detection_severity ⇒ Object
Accepts values: ‘informational’, ‘low’, ‘medium’, ‘high’, ‘critical’
43 44 45 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 43 def detection_severity @detection_severity end |
#enable_local_application_groups ⇒ Object
Returns the value of attribute enable_local_application_groups.
45 46 47 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 45 def enable_local_application_groups @enable_local_application_groups end |
#enable_printer_egress ⇒ Object
Warning(Windows): Filepath, file type and sensitivity label conditions are not supported
48 49 50 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 48 def enable_printer_egress @enable_printer_egress end |
#enable_screen_capture_rule ⇒ Object
Enable screen capture for this rule, the policy this classification is attached to should have screen capture enabled as a prerequisite
51 52 53 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 51 def enable_screen_capture_rule @enable_screen_capture_rule end |
#enable_usb_devices ⇒ Object
Warning: File path conditions are partially supported; file name and extension matching only; full file paths are not supported
54 55 56 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 54 def enable_usb_devices @enable_usb_devices end |
#enable_web_locations ⇒ Object
Returns the value of attribute enable_web_locations.
56 57 58 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 56 def enable_web_locations @enable_web_locations end |
#id ⇒ Object
Returns the value of attribute id.
58 59 60 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 58 def id @id end |
#local_application_groups ⇒ Object
List of local application groups. Maximum of 15 unique UUID groups are allowed
61 62 63 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 61 def local_application_groups @local_application_groups end |
#modified_time_stamp ⇒ Object
Returns the value of attribute modified_time_stamp.
63 64 65 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 63 def modified_time_stamp @modified_time_stamp end |
#notify_end_user ⇒ Object
Returns the value of attribute notify_end_user.
65 66 67 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 65 def notify_end_user @notify_end_user end |
#response_action ⇒ Object
Accepts values: ‘allow’, ‘block’, ‘justify’
68 69 70 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 68 def response_action @response_action end |
#trigger_detection ⇒ Object
Returns the value of attribute trigger_detection.
70 71 72 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 70 def trigger_detection @trigger_detection end |
#user_scope ⇒ Object
Accepts values: ‘all’, ‘specific’
73 74 75 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 73 def user_scope @user_scope end |
#web_locations ⇒ Object
Returns the value of attribute web_locations.
75 76 77 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 75 def web_locations @web_locations end |
#web_locations_scope ⇒ Object
Accepts values: ‘all’, ‘specific’
78 79 80 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 78 def web_locations_scope @web_locations_scope end |
Class Method Details
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
128 129 130 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 128 def self.acceptable_attributes attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 103 def self.attribute_map { :'ad_groups' => :'ad_groups', :'ad_users' => :'ad_users', :'created_time_stamp' => :'created_time_stamp', :'description' => :'description', :'detection_severity' => :'detection_severity', :'enable_local_application_groups' => :'enable_local_application_groups', :'enable_printer_egress' => :'enable_printer_egress', :'enable_screen_capture_rule' => :'enable_screen_capture_rule', :'enable_usb_devices' => :'enable_usb_devices', :'enable_web_locations' => :'enable_web_locations', :'id' => :'id', :'local_application_groups' => :'local_application_groups', :'modified_time_stamp' => :'modified_time_stamp', :'notify_end_user' => :'notify_end_user', :'response_action' => :'response_action', :'trigger_detection' => :'trigger_detection', :'user_scope' => :'user_scope', :'web_locations' => :'web_locations', :'web_locations_scope' => :'web_locations_scope' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
450 451 452 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 450 def self.build_from_hash(attributes) new.build_from_hash(attributes) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
158 159 160 161 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 158 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 133 def self.openapi_types { :'ad_groups' => :'Array<String>', :'ad_users' => :'Array<String>', :'created_time_stamp' => :'String', :'description' => :'String', :'detection_severity' => :'String', :'enable_local_application_groups' => :'Boolean', :'enable_printer_egress' => :'Boolean', :'enable_screen_capture_rule' => :'Boolean', :'enable_usb_devices' => :'Boolean', :'enable_web_locations' => :'Boolean', :'id' => :'String', :'local_application_groups' => :'Array<String>', :'modified_time_stamp' => :'String', :'notify_end_user' => :'Boolean', :'response_action' => :'String', :'trigger_detection' => :'Boolean', :'user_scope' => :'String', :'web_locations' => :'Array<String>', :'web_locations_scope' => :'String' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 411 def ==(o) return true if self.equal?(o) self.class == o.class && ad_groups == o.ad_groups && ad_users == o.ad_users && created_time_stamp == o.created_time_stamp && description == o.description && detection_severity == o.detection_severity && enable_local_application_groups == o.enable_local_application_groups && enable_printer_egress == o.enable_printer_egress && enable_screen_capture_rule == o.enable_screen_capture_rule && enable_usb_devices == o.enable_usb_devices && enable_web_locations == o.enable_web_locations && id == o.id && local_application_groups == o.local_application_groups && modified_time_stamp == o.modified_time_stamp && notify_end_user == o.notify_end_user && response_action == o.response_action && trigger_detection == o.trigger_detection && user_scope == o.user_scope && web_locations == o.web_locations && web_locations_scope == o.web_locations_scope end |
#_deserialize(type, value) ⇒ Object
Deserializes the data based on type
481 482 483 484 485 486 487 488 489 490 491 492 493 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 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 481 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
552 553 554 555 556 557 558 559 560 561 562 563 564 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 552 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
457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 457 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
437 438 439 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 437 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
443 444 445 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 443 def hash [ad_groups, ad_users, created_time_stamp, description, detection_severity, enable_local_application_groups, enable_printer_egress, enable_screen_capture_rule, enable_usb_devices, enable_web_locations, id, local_application_groups, modified_time_stamp, notify_end_user, response_action, trigger_detection, user_scope, web_locations, web_locations_scope].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
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 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 265 def list_invalid_properties invalid_properties = Array.new if @ad_groups.nil? invalid_properties.push('invalid value for "ad_groups", ad_groups cannot be nil.') end if @ad_users.nil? invalid_properties.push('invalid value for "ad_users", ad_users cannot be nil.') end if @description.nil? invalid_properties.push('invalid value for "description", description cannot be nil.') end if @detection_severity.nil? invalid_properties.push('invalid value for "detection_severity", detection_severity cannot be nil.') end if @enable_local_application_groups.nil? invalid_properties.push('invalid value for "enable_local_application_groups", enable_local_application_groups cannot be nil.') end if @enable_printer_egress.nil? invalid_properties.push('invalid value for "enable_printer_egress", enable_printer_egress cannot be nil.') end if @enable_screen_capture_rule.nil? invalid_properties.push('invalid value for "enable_screen_capture_rule", enable_screen_capture_rule cannot be nil.') end if @enable_usb_devices.nil? invalid_properties.push('invalid value for "enable_usb_devices", enable_usb_devices cannot be nil.') end if @enable_web_locations.nil? invalid_properties.push('invalid value for "enable_web_locations", enable_web_locations cannot be nil.') end if @id.nil? invalid_properties.push('invalid value for "id", id cannot be nil.') end if @local_application_groups.nil? invalid_properties.push('invalid value for "local_application_groups", local_application_groups cannot be nil.') end if @notify_end_user.nil? invalid_properties.push('invalid value for "notify_end_user", notify_end_user cannot be nil.') end if @response_action.nil? invalid_properties.push('invalid value for "response_action", response_action cannot be nil.') end if @trigger_detection.nil? invalid_properties.push('invalid value for "trigger_detection", trigger_detection cannot be nil.') end if @user_scope.nil? invalid_properties.push('invalid value for "user_scope", user_scope cannot be nil.') end if @web_locations.nil? invalid_properties.push('invalid value for "web_locations", web_locations cannot be nil.') end if @web_locations_scope.nil? invalid_properties.push('invalid value for "web_locations_scope", web_locations_scope cannot be nil.') end invalid_properties end |
#to_body ⇒ Hash
to_body is an alias to to_hash (backward compatibility)
528 529 530 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 528 def to_body to_hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 534 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
522 523 524 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 522 def to_s to_hash.to_s end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
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 367 |
# File 'lib/crimson-falcon/models/policymanager_external_rule.rb', line 340 def valid? return false if @ad_groups.nil? return false if @ad_users.nil? return false if @description.nil? return false if @detection_severity.nil? detection_severity_validator = EnumAttributeValidator.new('String', ["informational", "low", "medium", "high", "critical"]) return false unless detection_severity_validator.valid?(@detection_severity) return false if @enable_local_application_groups.nil? return false if @enable_printer_egress.nil? return false if @enable_screen_capture_rule.nil? return false if @enable_usb_devices.nil? return false if @enable_web_locations.nil? return false if @id.nil? return false if @local_application_groups.nil? return false if @notify_end_user.nil? return false if @response_action.nil? response_action_validator = EnumAttributeValidator.new('String', ["allow", "block", "justify"]) return false unless response_action_validator.valid?(@response_action) return false if @trigger_detection.nil? return false if @user_scope.nil? user_scope_validator = EnumAttributeValidator.new('String', ["all", "specific"]) return false unless user_scope_validator.valid?(@user_scope) return false if @web_locations.nil? return false if @web_locations_scope.nil? web_locations_scope_validator = EnumAttributeValidator.new('String', ["all", "specific"]) return false unless web_locations_scope_validator.valid?(@web_locations_scope) true end |