Class: OCI::LogAnalytics::Models::LogAnalyticsLabelView
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsLabelView
- Defined in:
- lib/oci/log_analytics/models/log_analytics_label_view.rb
Overview
LogAnalyticsLabelView
Constant Summary collapse
- PRIORITY_ENUM =
[ PRIORITY_NONE = 'NONE'.freeze, PRIORITY_LOW = 'LOW'.freeze, PRIORITY_MEDIUM = 'MEDIUM'.freeze, PRIORITY_HIGH = 'HIGH'.freeze, PRIORITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#aliases ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>
An arrya of label aliases.
-
#count_usage_in_alert_rule ⇒ Integer
The label alert rule usage count.
-
#count_usage_in_source ⇒ Integer
The label source usage count.
-
#description ⇒ String
The label description.
-
#display_name ⇒ String
The label display name.
-
#edit_version ⇒ Integer
The label edit version.
-
#id ⇒ Object
The label unique identifier.
-
#impact ⇒ String
The label impact.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#is_user_deleted ⇒ BOOLEAN
A flag indicating whether or not the label has been deleted.
-
#name ⇒ String
The label name.
-
#priority ⇒ String
The label priority.
-
#recommendation ⇒ String
The label recommendation.
-
#suggest_type ⇒ Integer
The label suggestion type.
-
#type ⇒ Integer
The label type.
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 = {}) ⇒ LogAnalyticsLabelView
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 = {}) ⇒ LogAnalyticsLabelView
Initializes the object
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 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 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 150 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.aliases = attributes[:'aliases'] if attributes[:'aliases'] self.count_usage_in_alert_rule = attributes[:'countUsageInAlertRule'] if attributes[:'countUsageInAlertRule'] raise 'You cannot provide both :countUsageInAlertRule and :count_usage_in_alert_rule' if attributes.key?(:'countUsageInAlertRule') && attributes.key?(:'count_usage_in_alert_rule') self.count_usage_in_alert_rule = attributes[:'count_usage_in_alert_rule'] if attributes[:'count_usage_in_alert_rule'] self.count_usage_in_source = attributes[:'countUsageInSource'] if attributes[:'countUsageInSource'] raise 'You cannot provide both :countUsageInSource and :count_usage_in_source' if attributes.key?(:'countUsageInSource') && attributes.key?(:'count_usage_in_source') self.count_usage_in_source = attributes[:'count_usage_in_source'] if attributes[:'count_usage_in_source'] self.id = attributes[:'id'] if attributes[:'id'] self.suggest_type = attributes[:'suggestType'] if attributes[:'suggestType'] raise 'You cannot provide both :suggestType and :suggest_type' if attributes.key?(:'suggestType') && attributes.key?(:'suggest_type') self.suggest_type = attributes[:'suggest_type'] if attributes[:'suggest_type'] self.description = attributes[:'description'] if attributes[:'description'] 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.edit_version = attributes[:'editVersion'] if attributes[:'editVersion'] raise 'You cannot provide both :editVersion and :edit_version' if attributes.key?(:'editVersion') && attributes.key?(:'edit_version') self.edit_version = attributes[:'edit_version'] if attributes[:'edit_version'] self.impact = attributes[:'impact'] if attributes[:'impact'] self.is_system = attributes[:'isSystem'] unless attributes[:'isSystem'].nil? raise 'You cannot provide both :isSystem and :is_system' if attributes.key?(:'isSystem') && attributes.key?(:'is_system') self.is_system = attributes[:'is_system'] unless attributes[:'is_system'].nil? self.name = attributes[:'name'] if attributes[:'name'] self.priority = attributes[:'priority'] if attributes[:'priority'] self.priority = "NONE" if priority.nil? && !attributes.key?(:'priority') # rubocop:disable Style/StringLiterals self.recommendation = attributes[:'recommendation'] if attributes[:'recommendation'] self.type = attributes[:'type'] if attributes[:'type'] self.is_user_deleted = attributes[:'isUserDeleted'] unless attributes[:'isUserDeleted'].nil? raise 'You cannot provide both :isUserDeleted and :is_user_deleted' if attributes.key?(:'isUserDeleted') && attributes.key?(:'is_user_deleted') self.is_user_deleted = attributes[:'is_user_deleted'] unless attributes[:'is_user_deleted'].nil? end |
Instance Attribute Details
#aliases ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>
An arrya of label aliases.
22 23 24 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 22 def aliases @aliases end |
#count_usage_in_alert_rule ⇒ Integer
The label alert rule usage count.
26 27 28 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 26 def count_usage_in_alert_rule @count_usage_in_alert_rule end |
#count_usage_in_source ⇒ Integer
The label source usage count.
30 31 32 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 30 def count_usage_in_source @count_usage_in_source end |
#description ⇒ String
The label description.
42 43 44 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 42 def description @description end |
#display_name ⇒ String
The label display name.
46 47 48 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 46 def display_name @display_name end |
#edit_version ⇒ Integer
The label edit version.
50 51 52 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 50 def edit_version @edit_version end |
#id ⇒ Object
The label unique identifier.
34 35 36 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 34 def id @id end |
#impact ⇒ String
The label impact.
54 55 56 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 54 def impact @impact end |
#is_system ⇒ BOOLEAN
The system flag. A value of false denotes a custom, or user defined object. A value of true denotes a built in object.
60 61 62 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 60 def is_system @is_system end |
#is_user_deleted ⇒ BOOLEAN
A flag indicating whether or not the label has been deleted.
81 82 83 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 81 def is_user_deleted @is_user_deleted end |
#name ⇒ String
The label name.
64 65 66 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 64 def name @name end |
#priority ⇒ String
The label priority. Default value is NONE.
68 69 70 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 68 def priority @priority end |
#recommendation ⇒ String
The label recommendation.
72 73 74 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 72 def recommendation @recommendation end |
#suggest_type ⇒ Integer
The label suggestion type.
38 39 40 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 38 def suggest_type @suggest_type end |
#type ⇒ Integer
The label type.
76 77 78 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 76 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 84 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'aliases': :'aliases', 'count_usage_in_alert_rule': :'countUsageInAlertRule', 'count_usage_in_source': :'countUsageInSource', 'id': :'id', 'suggest_type': :'suggestType', 'description': :'description', 'display_name': :'displayName', 'edit_version': :'editVersion', 'impact': :'impact', 'is_system': :'isSystem', 'name': :'name', 'priority': :'priority', 'recommendation': :'recommendation', 'type': :'type', 'is_user_deleted': :'isUserDeleted' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 107 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'aliases': :'Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>', 'count_usage_in_alert_rule': :'Integer', 'count_usage_in_source': :'Integer', 'id': :'Object', 'suggest_type': :'Integer', 'description': :'String', 'display_name': :'String', 'edit_version': :'Integer', 'impact': :'String', 'is_system': :'BOOLEAN', 'name': :'String', 'priority': :'String', 'recommendation': :'String', 'type': :'Integer', 'is_user_deleted': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && aliases == other.aliases && count_usage_in_alert_rule == other.count_usage_in_alert_rule && count_usage_in_source == other.count_usage_in_source && id == other.id && suggest_type == other.suggest_type && description == other.description && display_name == other.display_name && edit_version == other.edit_version && impact == other.impact && is_system == other.is_system && name == other.name && priority == other.priority && recommendation == other.recommendation && type == other.type && is_user_deleted == other.is_user_deleted end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 280 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
260 261 262 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 260 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
269 270 271 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 269 def hash [aliases, count_usage_in_alert_rule, count_usage_in_source, id, suggest_type, description, display_name, edit_version, impact, is_system, name, priority, recommendation, type, is_user_deleted].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
313 314 315 316 317 318 319 320 321 322 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 313 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
307 308 309 |
# File 'lib/oci/log_analytics/models/log_analytics_label_view.rb', line 307 def to_s to_hash.to_s end |