Class: OCI::LogAnalytics::Models::UpsertLogAnalyticsLabelDetails
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::UpsertLogAnalyticsLabelDetails
- Defined in:
- lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb
Overview
Upsert LogAnalytics Label Details
Constant Summary collapse
- PRIORITY_ENUM =
[ PRIORITY_NONE = 'NONE'.freeze, PRIORITY_LOW = 'LOW'.freeze, PRIORITY_MEDIUM = 'MEDIUM'.freeze, PRIORITY_HIGH = 'HIGH'.freeze ].freeze
- TYPE_ENUM =
[ TYPE_INFO = 'INFO'.freeze, TYPE_PROBLEM = 'PROBLEM'.freeze ].freeze
Instance Attribute Summary collapse
-
#aliases ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>
The alias list.
-
#description ⇒ String
The label description.
-
#display_name ⇒ String
The label display name.
-
#edit_version ⇒ Integer
The edit version.
-
#impact ⇒ String
The label impact.
-
#is_system ⇒ BOOLEAN
The system flag.
-
#name ⇒ String
The label name.
-
#priority ⇒ String
The label priority.
-
#recommendation ⇒ String
The label recommendation.
-
#suggest_type ⇒ Integer
suggest type.
-
#type ⇒ String
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 = {}) ⇒ UpsertLogAnalyticsLabelDetails
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 = {}) ⇒ UpsertLogAnalyticsLabelDetails
Initializes the object
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 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 124 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.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.type = "INFO" if type.nil? && !attributes.key?(:'type') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#aliases ⇒ Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>
The alias list.
25 26 27 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 25 def aliases @aliases end |
#description ⇒ String
The label description.
33 34 35 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 33 def description @description end |
#display_name ⇒ String
The label display name.
37 38 39 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 37 def display_name @display_name end |
#edit_version ⇒ Integer
The edit version.
41 42 43 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 41 def edit_version @edit_version end |
#impact ⇒ String
The label impact.
45 46 47 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 45 def impact @impact end |
#is_system ⇒ BOOLEAN
The system flag. A value of false denotes a custom, or user defined label. A value of true denotes a built in label.
51 52 53 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 51 def is_system @is_system end |
#name ⇒ String
The label name.
55 56 57 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 55 def name @name end |
#priority ⇒ String
The label priority. Valid values are (NONE, LOW, HIGH). NONE is default.
59 60 61 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 59 def priority @priority end |
#recommendation ⇒ String
The label recommendation.
63 64 65 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 63 def recommendation @recommendation end |
#suggest_type ⇒ Integer
suggest type
29 30 31 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 29 def suggest_type @suggest_type end |
#type ⇒ String
The label type. Valid values are (INFO, PROBLEM). INFO is default.
67 68 69 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 67 def type @type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 70 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'aliases': :'aliases', 'suggest_type': :'suggestType', 'description': :'description', 'display_name': :'displayName', 'edit_version': :'editVersion', 'impact': :'impact', 'is_system': :'isSystem', 'name': :'name', 'priority': :'priority', 'recommendation': :'recommendation', 'type': :'type' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 89 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'aliases': :'Array<OCI::LogAnalytics::Models::LogAnalyticsLabelAlias>', 'suggest_type': :'Integer', 'description': :'String', 'display_name': :'String', 'edit_version': :'Integer', 'impact': :'String', 'is_system': :'BOOLEAN', 'name': :'String', 'priority': :'String', 'recommendation': :'String', 'type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 194 def ==(other) return true if equal?(other) self.class == other.class && aliases == other.aliases && 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 234 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
214 215 216 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 214 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
223 224 225 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 223 def hash [aliases, suggest_type, description, display_name, edit_version, impact, is_system, name, priority, recommendation, type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 267 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
261 262 263 |
# File 'lib/oci/log_analytics/models/upsert_log_analytics_label_details.rb', line 261 def to_s to_hash.to_s end |