Class: OCI::CloudGuard::Models::Sighting
- Inherits:
-
Object
- Object
- OCI::CloudGuard::Models::Sighting
- Defined in:
- lib/oci/cloud_guard/models/sighting.rb
Overview
Sighting details.
Constant Summary collapse
- CLASSIFICATION_STATUS_ENUM =
[ CLASSIFICATION_STATUS_FALSE_NEGATIVE = 'FALSE_NEGATIVE'.freeze, CLASSIFICATION_STATUS_TRUE_NEGATIVE = 'TRUE_NEGATIVE'.freeze, CLASSIFICATION_STATUS_FALSE_POSITIVE = 'FALSE_POSITIVE'.freeze, CLASSIFICATION_STATUS_TRUE_POSITIVE = 'TRUE_POSITIVE'.freeze, CLASSIFICATION_STATUS_NOT_CLASSIFIED = 'NOT_CLASSIFIED'.freeze, CLASSIFICATION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SEVERITY_ENUM =
[ SEVERITY_CRITICAL = 'CRITICAL'.freeze, SEVERITY_HIGH = 'HIGH'.freeze, SEVERITY_MEDIUM = 'MEDIUM'.freeze, SEVERITY_LOW = 'LOW'.freeze, SEVERITY_MINOR = 'MINOR'.freeze, SEVERITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CONFIDENCE_ENUM =
[ CONFIDENCE_CRITICAL = 'CRITICAL'.freeze, CONFIDENCE_HIGH = 'HIGH'.freeze, CONFIDENCE_MEDIUM = 'MEDIUM'.freeze, CONFIDENCE_LOW = 'LOW'.freeze, CONFIDENCE_MINOR = 'MINOR'.freeze, CONFIDENCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#actor_principal_id ⇒ String
Unique identifier for principal actor.
-
#actor_principal_name ⇒ String
Name of the principal actor.
-
#actor_principal_type ⇒ String
Type of the principal actor.
-
#additional_details ⇒ Hash<String, String>
The additional details for the sighting.
-
#classification_status ⇒ String
[Required] Classification status of the sighting.
-
#compartment_id ⇒ String
[Required] Compartment OCID where the resource is created.
-
#confidence ⇒ String
[Required] Level of confidence that the sighting is not a false positive.
-
#description ⇒ String
[Required] Description of the sighting.
-
#id ⇒ String
[Required] Unique identifier for the sighting.
-
#locks ⇒ Array<OCI::CloudGuard::Models::ResourceLock>
Locks associated with this resource.
-
#problem_id ⇒ String
Problem ID associated the sighting.
-
#regions ⇒ Array<String>
[Required] List of regions involved in the sighting.
-
#severity ⇒ String
[Required] Severity of the sighting.
-
#sighting_score ⇒ Integer
[Required] Score for the sighting.
-
#sighting_type ⇒ String
[Required] Type of sighting.
-
#sighting_type_display_name ⇒ String
[Required] Display name of the sighting type.
-
#tactic_name ⇒ String
[Required] Name of the MITRE ATT@CK framework tactic.
-
#technique_name ⇒ String
[Required] Name of the MITRE ATT@CK framework technique.
-
#time_first_detected ⇒ DateTime
[Required] Time the activities were first detected.
-
#time_first_occurred ⇒ DateTime
Time the activities were first performed.
-
#time_last_detected ⇒ DateTime
[Required] Time the activities were last detected.
-
#time_last_occurred ⇒ DateTime
Time the activities were last performed.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ Sighting
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ Sighting
Initializes the object
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 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 215 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.id = attributes[:'id'] if attributes[:'id'] self.description = attributes[:'description'] if attributes[:'description'] self.problem_id = attributes[:'problemId'] if attributes[:'problemId'] raise 'You cannot provide both :problemId and :problem_id' if attributes.key?(:'problemId') && attributes.key?(:'problem_id') self.problem_id = attributes[:'problem_id'] if attributes[:'problem_id'] self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId'] raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id') self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id'] self.actor_principal_id = attributes[:'actorPrincipalId'] if attributes[:'actorPrincipalId'] raise 'You cannot provide both :actorPrincipalId and :actor_principal_id' if attributes.key?(:'actorPrincipalId') && attributes.key?(:'actor_principal_id') self.actor_principal_id = attributes[:'actor_principal_id'] if attributes[:'actor_principal_id'] self.actor_principal_name = attributes[:'actorPrincipalName'] if attributes[:'actorPrincipalName'] raise 'You cannot provide both :actorPrincipalName and :actor_principal_name' if attributes.key?(:'actorPrincipalName') && attributes.key?(:'actor_principal_name') self.actor_principal_name = attributes[:'actor_principal_name'] if attributes[:'actor_principal_name'] self.actor_principal_type = attributes[:'actorPrincipalType'] if attributes[:'actorPrincipalType'] raise 'You cannot provide both :actorPrincipalType and :actor_principal_type' if attributes.key?(:'actorPrincipalType') && attributes.key?(:'actor_principal_type') self.actor_principal_type = attributes[:'actor_principal_type'] if attributes[:'actor_principal_type'] self.classification_status = attributes[:'classificationStatus'] if attributes[:'classificationStatus'] raise 'You cannot provide both :classificationStatus and :classification_status' if attributes.key?(:'classificationStatus') && attributes.key?(:'classification_status') self.classification_status = attributes[:'classification_status'] if attributes[:'classification_status'] self.sighting_type = attributes[:'sightingType'] if attributes[:'sightingType'] raise 'You cannot provide both :sightingType and :sighting_type' if attributes.key?(:'sightingType') && attributes.key?(:'sighting_type') self.sighting_type = attributes[:'sighting_type'] if attributes[:'sighting_type'] self.sighting_type_display_name = attributes[:'sightingTypeDisplayName'] if attributes[:'sightingTypeDisplayName'] raise 'You cannot provide both :sightingTypeDisplayName and :sighting_type_display_name' if attributes.key?(:'sightingTypeDisplayName') && attributes.key?(:'sighting_type_display_name') self.sighting_type_display_name = attributes[:'sighting_type_display_name'] if attributes[:'sighting_type_display_name'] self.tactic_name = attributes[:'tacticName'] if attributes[:'tacticName'] raise 'You cannot provide both :tacticName and :tactic_name' if attributes.key?(:'tacticName') && attributes.key?(:'tactic_name') self.tactic_name = attributes[:'tactic_name'] if attributes[:'tactic_name'] self.technique_name = attributes[:'techniqueName'] if attributes[:'techniqueName'] raise 'You cannot provide both :techniqueName and :technique_name' if attributes.key?(:'techniqueName') && attributes.key?(:'technique_name') self.technique_name = attributes[:'technique_name'] if attributes[:'technique_name'] self.sighting_score = attributes[:'sightingScore'] if attributes[:'sightingScore'] raise 'You cannot provide both :sightingScore and :sighting_score' if attributes.key?(:'sightingScore') && attributes.key?(:'sighting_score') self.sighting_score = attributes[:'sighting_score'] if attributes[:'sighting_score'] self.severity = attributes[:'severity'] if attributes[:'severity'] self.confidence = attributes[:'confidence'] if attributes[:'confidence'] self.time_first_detected = attributes[:'timeFirstDetected'] if attributes[:'timeFirstDetected'] raise 'You cannot provide both :timeFirstDetected and :time_first_detected' if attributes.key?(:'timeFirstDetected') && attributes.key?(:'time_first_detected') self.time_first_detected = attributes[:'time_first_detected'] if attributes[:'time_first_detected'] self.time_last_detected = attributes[:'timeLastDetected'] if attributes[:'timeLastDetected'] raise 'You cannot provide both :timeLastDetected and :time_last_detected' if attributes.key?(:'timeLastDetected') && attributes.key?(:'time_last_detected') self.time_last_detected = attributes[:'time_last_detected'] if attributes[:'time_last_detected'] self.time_first_occurred = attributes[:'timeFirstOccurred'] if attributes[:'timeFirstOccurred'] raise 'You cannot provide both :timeFirstOccurred and :time_first_occurred' if attributes.key?(:'timeFirstOccurred') && attributes.key?(:'time_first_occurred') self.time_first_occurred = attributes[:'time_first_occurred'] if attributes[:'time_first_occurred'] self.time_last_occurred = attributes[:'timeLastOccurred'] if attributes[:'timeLastOccurred'] raise 'You cannot provide both :timeLastOccurred and :time_last_occurred' if attributes.key?(:'timeLastOccurred') && attributes.key?(:'time_last_occurred') self.time_last_occurred = attributes[:'time_last_occurred'] if attributes[:'time_last_occurred'] self.regions = attributes[:'regions'] if attributes[:'regions'] self.additional_details = attributes[:'additionalDetails'] if attributes[:'additionalDetails'] raise 'You cannot provide both :additionalDetails and :additional_details' if attributes.key?(:'additionalDetails') && attributes.key?(:'additional_details') self.additional_details = attributes[:'additional_details'] if attributes[:'additional_details'] self.locks = attributes[:'locks'] if attributes[:'locks'] end |
Instance Attribute Details
#actor_principal_id ⇒ String
Unique identifier for principal actor
57 58 59 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 57 def actor_principal_id @actor_principal_id end |
#actor_principal_name ⇒ String
Name of the principal actor
61 62 63 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 61 def actor_principal_name @actor_principal_name end |
#actor_principal_type ⇒ String
Type of the principal actor
65 66 67 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 65 def actor_principal_type @actor_principal_type end |
#additional_details ⇒ Hash<String, String>
The additional details for the sighting
121 122 123 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 121 def additional_details @additional_details end |
#classification_status ⇒ String
[Required] Classification status of the sighting
69 70 71 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 69 def classification_status @classification_status end |
#compartment_id ⇒ String
[Required] Compartment OCID where the resource is created
53 54 55 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 53 def compartment_id @compartment_id end |
#confidence ⇒ String
[Required] Level of confidence that the sighting is not a false positive
97 98 99 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 97 def confidence @confidence end |
#description ⇒ String
[Required] Description of the sighting
45 46 47 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 45 def description @description end |
#id ⇒ String
[Required] Unique identifier for the sighting
41 42 43 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 41 def id @id end |
#locks ⇒ Array<OCI::CloudGuard::Models::ResourceLock>
Locks associated with this resource.
125 126 127 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 125 def locks @locks end |
#problem_id ⇒ String
Problem ID associated the sighting
49 50 51 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 49 def problem_id @problem_id end |
#regions ⇒ Array<String>
[Required] List of regions involved in the sighting
117 118 119 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 117 def regions @regions end |
#severity ⇒ String
[Required] Severity of the sighting
93 94 95 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 93 def severity @severity end |
#sighting_score ⇒ Integer
[Required] Score for the sighting
89 90 91 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 89 def sighting_score @sighting_score end |
#sighting_type ⇒ String
[Required] Type of sighting
73 74 75 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 73 def sighting_type @sighting_type end |
#sighting_type_display_name ⇒ String
[Required] Display name of the sighting type
77 78 79 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 77 def sighting_type_display_name @sighting_type_display_name end |
#tactic_name ⇒ String
[Required] Name of the MITRE ATT@CK framework tactic
81 82 83 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 81 def tactic_name @tactic_name end |
#technique_name ⇒ String
[Required] Name of the MITRE ATT@CK framework technique
85 86 87 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 85 def technique_name @technique_name end |
#time_first_detected ⇒ DateTime
[Required] Time the activities were first detected. Format defined by RFC3339.
101 102 103 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 101 def time_first_detected @time_first_detected end |
#time_first_occurred ⇒ DateTime
Time the activities were first performed. Format defined by RFC3339.
109 110 111 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 109 def time_first_occurred @time_first_occurred end |
#time_last_detected ⇒ DateTime
[Required] Time the activities were last detected. Format defined by RFC3339.
105 106 107 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 105 def time_last_detected @time_last_detected end |
#time_last_occurred ⇒ DateTime
Time the activities were last performed. Format defined by RFC3339.
113 114 115 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 113 def time_last_occurred @time_last_occurred end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 128 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'description': :'description', 'problem_id': :'problemId', 'compartment_id': :'compartmentId', 'actor_principal_id': :'actorPrincipalId', 'actor_principal_name': :'actorPrincipalName', 'actor_principal_type': :'actorPrincipalType', 'classification_status': :'classificationStatus', 'sighting_type': :'sightingType', 'sighting_type_display_name': :'sightingTypeDisplayName', 'tactic_name': :'tacticName', 'technique_name': :'techniqueName', 'sighting_score': :'sightingScore', 'severity': :'severity', 'confidence': :'confidence', 'time_first_detected': :'timeFirstDetected', 'time_last_detected': :'timeLastDetected', 'time_first_occurred': :'timeFirstOccurred', 'time_last_occurred': :'timeLastOccurred', 'regions': :'regions', 'additional_details': :'additionalDetails', 'locks': :'locks' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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/oci/cloud_guard/models/sighting.rb', line 158 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'description': :'String', 'problem_id': :'String', 'compartment_id': :'String', 'actor_principal_id': :'String', 'actor_principal_name': :'String', 'actor_principal_type': :'String', 'classification_status': :'String', 'sighting_type': :'String', 'sighting_type_display_name': :'String', 'tactic_name': :'String', 'technique_name': :'String', 'sighting_score': :'Integer', 'severity': :'String', 'confidence': :'String', 'time_first_detected': :'DateTime', 'time_last_detected': :'DateTime', 'time_first_occurred': :'DateTime', 'time_last_occurred': :'DateTime', 'regions': :'Array<String>', 'additional_details': :'Hash<String, String>', 'locks': :'Array<OCI::CloudGuard::Models::ResourceLock>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 376 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && description == other.description && problem_id == other.problem_id && compartment_id == other.compartment_id && actor_principal_id == other.actor_principal_id && actor_principal_name == other.actor_principal_name && actor_principal_type == other.actor_principal_type && classification_status == other.classification_status && sighting_type == other.sighting_type && sighting_type_display_name == other.sighting_type_display_name && tactic_name == other.tactic_name && technique_name == other.technique_name && sighting_score == other.sighting_score && severity == other.severity && confidence == other.confidence && time_first_detected == other.time_first_detected && time_last_detected == other.time_last_detected && time_first_occurred == other.time_first_occurred && time_last_occurred == other.time_last_occurred && regions == other.regions && additional_details == other.additional_details && locks == other.locks end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 427 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
407 408 409 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 407 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
416 417 418 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 416 def hash [id, description, problem_id, compartment_id, actor_principal_id, actor_principal_name, actor_principal_type, classification_status, sighting_type, sighting_type_display_name, tactic_name, technique_name, sighting_score, severity, confidence, time_first_detected, time_last_detected, time_first_occurred, time_last_occurred, regions, additional_details, locks].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
460 461 462 463 464 465 466 467 468 469 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 460 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
454 455 456 |
# File 'lib/oci/cloud_guard/models/sighting.rb', line 454 def to_s to_hash.to_s end |