Class: OCI::Multicloud::Models::MulticloudAlert
- Inherits:
-
Object
- Object
- OCI::Multicloud::Models::MulticloudAlert
- Defined in:
- lib/oci/multicloud/models/multicloud_alert.rb
Overview
A multicloud Alert
Constant Summary collapse
- SEVERITY_ENUM =
[ SEVERITY_LOW = 'LOW'.freeze, SEVERITY_MEDIUM = 'MEDIUM'.freeze, SEVERITY_HIGH = 'HIGH'.freeze, SEVERITY_CRITICAL = 'CRITICAL'.freeze, SEVERITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- SUBSCRIPTION_TYPE_ENUM =
[ SUBSCRIPTION_TYPE_ORACLEDBATAZURE = 'ORACLEDBATAZURE'.freeze, SUBSCRIPTION_TYPE_ORACLEDBATGOOGLE = 'ORACLEDBATGOOGLE'.freeze, SUBSCRIPTION_TYPE_ORACLEDBATAWS = 'ORACLEDBATAWS'.freeze, SUBSCRIPTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ALERT_STATUS_ENUM =
[ ALERT_STATUS_UNACKNOWLEDGED = 'UNACKNOWLEDGED'.freeze, ALERT_STATUS_ACKNOWLEDGED = 'ACKNOWLEDGED'.freeze, ALERT_STATUS_RESOLVED = 'RESOLVED'.freeze, ALERT_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_CREATING = 'CREATING'.freeze, LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze, LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze, LIFECYCLE_STATE_DELETING = 'DELETING'.freeze, LIFECYCLE_STATE_DELETED = 'DELETED'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#additional_parameters ⇒ Hash<String, String>
Alert-specific contextual parameters.
-
#alert_id ⇒ String
External or human-friendly alert identifier.
-
#alert_status ⇒ String
[Required] Current acknowledgment status of the alert.
-
#alert_type ⇒ String
[Required] Type/category of the alert (e.g. IAM_POLICY_GAP, TAG_INCONSISTENCY).
-
#compartment_id ⇒ String
Root Compartment The OCID (TenantId) associated with the alert.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#description ⇒ String
Description of the alert and its purpose.
-
#display_name ⇒ String
[Required] Human-readable name of the alert.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#function_type ⇒ String
[Required] Internal service or function type generating the alert (e.g. ORP, ODBG_NETWORK, BILLING, OBSERVABILITY).
-
#id ⇒ String
[Required] The OCID of the multicloud alert.
-
#lifecycle_state ⇒ String
The current state of the Multicloud Network Alert.
-
#resource_id ⇒ String
The OCID of the affected resource.
-
#resource_type ⇒ String
Type of the affected resource (e.g. ADBD).
-
#severity ⇒ String
[Required] Severity of the alert.
-
#source ⇒ String
Source subsystem that generated the alert.
-
#source_region ⇒ String
OCI region where the alert originated (e.g. us-phoenix-1).
-
#subscription_id ⇒ String
The OCID of the multicloud subscription.
-
#subscription_type ⇒ String
Oracle Cloud Infrastructure Subscription Type.
-
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource.
-
#time_created ⇒ DateTime
[Required] Timestamp when the alert was created.
-
#time_updated ⇒ DateTime
Timestamp when the alert was last updated.
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 = {}) ⇒ MulticloudAlert
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 = {}) ⇒ MulticloudAlert
Initializes the object
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 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 231 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.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.description = attributes[:'description'] if attributes[:'description'] self.alert_type = attributes[:'alertType'] if attributes[:'alertType'] raise 'You cannot provide both :alertType and :alert_type' if attributes.key?(:'alertType') && attributes.key?(:'alert_type') self.alert_type = attributes[:'alert_type'] if attributes[:'alert_type'] self.severity = attributes[:'severity'] if attributes[:'severity'] self.subscription_id = attributes[:'subscriptionId'] if attributes[:'subscriptionId'] raise 'You cannot provide both :subscriptionId and :subscription_id' if attributes.key?(:'subscriptionId') && attributes.key?(:'subscription_id') self.subscription_id = attributes[:'subscription_id'] if attributes[:'subscription_id'] self.subscription_type = attributes[:'subscriptionType'] if attributes[:'subscriptionType'] raise 'You cannot provide both :subscriptionType and :subscription_type' if attributes.key?(:'subscriptionType') && attributes.key?(:'subscription_type') self.subscription_type = attributes[:'subscription_type'] if attributes[:'subscription_type'] self.alert_status = attributes[:'alertStatus'] if attributes[:'alertStatus'] raise 'You cannot provide both :alertStatus and :alert_status' if attributes.key?(:'alertStatus') && attributes.key?(:'alert_status') self.alert_status = attributes[:'alert_status'] if attributes[:'alert_status'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] 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.function_type = attributes[:'functionType'] if attributes[:'functionType'] raise 'You cannot provide both :functionType and :function_type' if attributes.key?(:'functionType') && attributes.key?(:'function_type') self.function_type = attributes[:'function_type'] if attributes[:'function_type'] self.source = attributes[:'source'] if attributes[:'source'] self.alert_id = attributes[:'alertId'] if attributes[:'alertId'] raise 'You cannot provide both :alertId and :alert_id' if attributes.key?(:'alertId') && attributes.key?(:'alert_id') self.alert_id = attributes[:'alert_id'] if attributes[:'alert_id'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] self. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = attributes[:'defined_tags'] if attributes[:'defined_tags'] self. = attributes[:'systemTags'] if attributes[:'systemTags'] raise 'You cannot provide both :systemTags and :system_tags' if attributes.key?(:'systemTags') && attributes.key?(:'system_tags') self. = attributes[:'system_tags'] if attributes[:'system_tags'] self.source_region = attributes[:'sourceRegion'] if attributes[:'sourceRegion'] raise 'You cannot provide both :sourceRegion and :source_region' if attributes.key?(:'sourceRegion') && attributes.key?(:'source_region') self.source_region = attributes[:'source_region'] if attributes[:'source_region'] self.additional_parameters = attributes[:'additionalParameters'] if attributes[:'additionalParameters'] raise 'You cannot provide both :additionalParameters and :additional_parameters' if attributes.key?(:'additionalParameters') && attributes.key?(:'additional_parameters') self.additional_parameters = attributes[:'additional_parameters'] if attributes[:'additional_parameters'] end |
Instance Attribute Details
#additional_parameters ⇒ Hash<String, String>
Alert-specific contextual parameters.
141 142 143 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 141 def additional_parameters @additional_parameters end |
#alert_id ⇒ String
External or human-friendly alert identifier.
106 107 108 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 106 def alert_id @alert_id end |
#alert_status ⇒ String
[Required] Current acknowledgment status of the alert.
74 75 76 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 74 def alert_status @alert_status end |
#alert_type ⇒ String
[Required] Type/category of the alert (e.g. IAM_POLICY_GAP, TAG_INCONSISTENCY).
58 59 60 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 58 def alert_type @alert_type end |
#compartment_id ⇒ String
Root Compartment The OCID (TenantId) associated with the alert.
94 95 96 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 94 def compartment_id @compartment_id end |
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.
Example: {\"Operations\": {\"CostCenter\": \"42\"}}
126 127 128 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 126 def @defined_tags end |
#description ⇒ String
Description of the alert and its purpose.
54 55 56 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 54 def description @description end |
#display_name ⇒ String
[Required] Human-readable name of the alert.
50 51 52 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 50 def display_name @display_name end |
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.
Example: {\"Department\": \"Finance\"}
118 119 120 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 118 def @freeform_tags end |
#function_type ⇒ String
[Required] Internal service or function type generating the alert (e.g. ORP, ODBG_NETWORK, BILLING, OBSERVABILITY).
98 99 100 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 98 def function_type @function_type end |
#id ⇒ String
[Required] The OCID of the multicloud alert.
46 47 48 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 46 def id @id end |
#lifecycle_state ⇒ String
The current state of the Multicloud Network Alert.
110 111 112 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 110 def lifecycle_state @lifecycle_state end |
#resource_id ⇒ String
The OCID of the affected resource.
86 87 88 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 86 def resource_id @resource_id end |
#resource_type ⇒ String
Type of the affected resource (e.g. ADBD).
90 91 92 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 90 def resource_type @resource_type end |
#severity ⇒ String
[Required] Severity of the alert.
62 63 64 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 62 def severity @severity end |
#source ⇒ String
Source subsystem that generated the alert. (Azure Tag Validation)
102 103 104 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 102 def source @source end |
#source_region ⇒ String
OCI region where the alert originated (e.g. us-phoenix-1)
137 138 139 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 137 def source_region @source_region end |
#subscription_id ⇒ String
The OCID of the multicloud subscription.
66 67 68 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 66 def subscription_id @subscription_id end |
#subscription_type ⇒ String
Oracle Cloud Infrastructure Subscription Type.
70 71 72 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 70 def subscription_type @subscription_type end |
#system_tags ⇒ Hash<String, Hash<String, Object>>
System tags for this resource. Each key is predefined and scoped to a namespace.
Example: {\"orcl-cloud\": {\"free-tier-retained\": \"true\"}}
133 134 135 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 133 def @system_tags end |
#time_created ⇒ DateTime
[Required] Timestamp when the alert was created.
78 79 80 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 78 def time_created @time_created end |
#time_updated ⇒ DateTime
Timestamp when the alert was last updated.
82 83 84 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 82 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
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 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 144 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'display_name': :'displayName', 'description': :'description', 'alert_type': :'alertType', 'severity': :'severity', 'subscription_id': :'subscriptionId', 'subscription_type': :'subscriptionType', 'alert_status': :'alertStatus', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'resource_id': :'resourceId', 'resource_type': :'resourceType', 'compartment_id': :'compartmentId', 'function_type': :'functionType', 'source': :'source', 'alert_id': :'alertId', 'lifecycle_state': :'lifecycleState', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'source_region': :'sourceRegion', 'additional_parameters': :'additionalParameters' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 174 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'display_name': :'String', 'description': :'String', 'alert_type': :'String', 'severity': :'String', 'subscription_id': :'String', 'subscription_type': :'String', 'alert_status': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'resource_id': :'String', 'resource_type': :'String', 'compartment_id': :'String', 'function_type': :'String', 'source': :'String', 'alert_id': :'String', 'lifecycle_state': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'source_region': :'String', 'additional_parameters': :'Hash<String, String>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
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 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 413 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && display_name == other.display_name && description == other.description && alert_type == other.alert_type && severity == other.severity && subscription_id == other.subscription_id && subscription_type == other.subscription_type && alert_status == other.alert_status && time_created == other.time_created && time_updated == other.time_updated && resource_id == other.resource_id && resource_type == other.resource_type && compartment_id == other.compartment_id && function_type == other.function_type && source == other.source && alert_id == other.alert_id && lifecycle_state == other.lifecycle_state && == other. && == other. && == other. && source_region == other.source_region && additional_parameters == other.additional_parameters end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 464 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
444 445 446 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 444 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
453 454 455 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 453 def hash [id, display_name, description, alert_type, severity, subscription_id, subscription_type, alert_status, time_created, time_updated, resource_id, resource_type, compartment_id, function_type, source, alert_id, lifecycle_state, , , , source_region, additional_parameters].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
497 498 499 500 501 502 503 504 505 506 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 497 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
491 492 493 |
# File 'lib/oci/multicloud/models/multicloud_alert.rb', line 491 def to_s to_hash.to_s end |