Class: OCI::LogAnalytics::Models::LogAnalyticsAssociation
- Inherits:
-
Object
- Object
- OCI::LogAnalytics::Models::LogAnalyticsAssociation
- Defined in:
- lib/oci/log_analytics/models/log_analytics_association.rb
Overview
LogAnalyticsAssociation
Constant Summary collapse
- LIFE_CYCLE_STATE_ENUM =
[ LIFE_CYCLE_STATE_ACCEPTED = 'ACCEPTED'.freeze, LIFE_CYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFE_CYCLE_STATE_SUCCEEDED = 'SUCCEEDED'.freeze, LIFE_CYCLE_STATE_FAILED = 'FAILED'.freeze, LIFE_CYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#agent_entity_name ⇒ String
The name of the entity which contains the agent.
-
#agent_id ⇒ String
The agent unique identifier.
-
#entity_id ⇒ String
The entity unique identifier.
-
#entity_name ⇒ String
The entity name.
-
#entity_type_display_name ⇒ String
The entity type display name.
-
#entity_type_name ⇒ String
The entity type internal name.
-
#failure_message ⇒ String
The failure message.
-
#host ⇒ String
The host name.
-
#life_cycle_state ⇒ String
The lifecycle status.
-
#log_group_compartment ⇒ String
The log group compartment.
-
#log_group_id ⇒ String
The log group unique identifier.
-
#log_group_name ⇒ String
The log group name.
-
#retry_count ⇒ Integer
The number of times the association will be attempted before failing.
-
#source_display_name ⇒ String
The source display name.
-
#source_name ⇒ String
The source name.
-
#source_type_name ⇒ String
The source type internal name.
-
#time_last_attempted ⇒ DateTime
The last attempt date.
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 = {}) ⇒ LogAnalyticsAssociation
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 = {}) ⇒ LogAnalyticsAssociation
Initializes the object
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 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 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 164 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. = attributes[:'failureMessage'] if attributes[:'failureMessage'] raise 'You cannot provide both :failureMessage and :failure_message' if attributes.key?(:'failureMessage') && attributes.key?(:'failure_message') self. = attributes[:'failure_message'] if attributes[:'failure_message'] self.agent_id = attributes[:'agentId'] if attributes[:'agentId'] raise 'You cannot provide both :agentId and :agent_id' if attributes.key?(:'agentId') && attributes.key?(:'agent_id') self.agent_id = attributes[:'agent_id'] if attributes[:'agent_id'] self.time_last_attempted = attributes[:'timeLastAttempted'] if attributes[:'timeLastAttempted'] raise 'You cannot provide both :timeLastAttempted and :time_last_attempted' if attributes.key?(:'timeLastAttempted') && attributes.key?(:'time_last_attempted') self.time_last_attempted = attributes[:'time_last_attempted'] if attributes[:'time_last_attempted'] self.retry_count = attributes[:'retryCount'] if attributes[:'retryCount'] raise 'You cannot provide both :retryCount and :retry_count' if attributes.key?(:'retryCount') && attributes.key?(:'retry_count') self.retry_count = attributes[:'retry_count'] if attributes[:'retry_count'] self.source_name = attributes[:'sourceName'] if attributes[:'sourceName'] raise 'You cannot provide both :sourceName and :source_name' if attributes.key?(:'sourceName') && attributes.key?(:'source_name') self.source_name = attributes[:'source_name'] if attributes[:'source_name'] self.source_display_name = attributes[:'sourceDisplayName'] if attributes[:'sourceDisplayName'] raise 'You cannot provide both :sourceDisplayName and :source_display_name' if attributes.key?(:'sourceDisplayName') && attributes.key?(:'source_display_name') self.source_display_name = attributes[:'source_display_name'] if attributes[:'source_display_name'] self.source_type_name = attributes[:'sourceTypeName'] if attributes[:'sourceTypeName'] raise 'You cannot provide both :sourceTypeName and :source_type_name' if attributes.key?(:'sourceTypeName') && attributes.key?(:'source_type_name') self.source_type_name = attributes[:'source_type_name'] if attributes[:'source_type_name'] self.life_cycle_state = attributes[:'lifeCycleState'] if attributes[:'lifeCycleState'] self.life_cycle_state = "SUCCEEDED" if life_cycle_state.nil? && !attributes.key?(:'lifeCycleState') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :lifeCycleState and :life_cycle_state' if attributes.key?(:'lifeCycleState') && attributes.key?(:'life_cycle_state') self.life_cycle_state = attributes[:'life_cycle_state'] if attributes[:'life_cycle_state'] self.life_cycle_state = "SUCCEEDED" if life_cycle_state.nil? && !attributes.key?(:'lifeCycleState') && !attributes.key?(:'life_cycle_state') # rubocop:disable Style/StringLiterals self.entity_id = attributes[:'entityId'] if attributes[:'entityId'] raise 'You cannot provide both :entityId and :entity_id' if attributes.key?(:'entityId') && attributes.key?(:'entity_id') self.entity_id = attributes[:'entity_id'] if attributes[:'entity_id'] self.entity_name = attributes[:'entityName'] if attributes[:'entityName'] raise 'You cannot provide both :entityName and :entity_name' if attributes.key?(:'entityName') && attributes.key?(:'entity_name') self.entity_name = attributes[:'entity_name'] if attributes[:'entity_name'] self.entity_type_name = attributes[:'entityTypeName'] if attributes[:'entityTypeName'] raise 'You cannot provide both :entityTypeName and :entity_type_name' if attributes.key?(:'entityTypeName') && attributes.key?(:'entity_type_name') self.entity_type_name = attributes[:'entity_type_name'] if attributes[:'entity_type_name'] self.host = attributes[:'host'] if attributes[:'host'] self.agent_entity_name = attributes[:'agentEntityName'] if attributes[:'agentEntityName'] raise 'You cannot provide both :agentEntityName and :agent_entity_name' if attributes.key?(:'agentEntityName') && attributes.key?(:'agent_entity_name') self.agent_entity_name = attributes[:'agent_entity_name'] if attributes[:'agent_entity_name'] self.entity_type_display_name = attributes[:'entityTypeDisplayName'] if attributes[:'entityTypeDisplayName'] raise 'You cannot provide both :entityTypeDisplayName and :entity_type_display_name' if attributes.key?(:'entityTypeDisplayName') && attributes.key?(:'entity_type_display_name') self.entity_type_display_name = attributes[:'entity_type_display_name'] if attributes[:'entity_type_display_name'] self.log_group_id = attributes[:'logGroupId'] if attributes[:'logGroupId'] raise 'You cannot provide both :logGroupId and :log_group_id' if attributes.key?(:'logGroupId') && attributes.key?(:'log_group_id') self.log_group_id = attributes[:'log_group_id'] if attributes[:'log_group_id'] self.log_group_name = attributes[:'logGroupName'] if attributes[:'logGroupName'] raise 'You cannot provide both :logGroupName and :log_group_name' if attributes.key?(:'logGroupName') && attributes.key?(:'log_group_name') self.log_group_name = attributes[:'log_group_name'] if attributes[:'log_group_name'] self.log_group_compartment = attributes[:'logGroupCompartment'] if attributes[:'logGroupCompartment'] raise 'You cannot provide both :logGroupCompartment and :log_group_compartment' if attributes.key?(:'logGroupCompartment') && attributes.key?(:'log_group_compartment') self.log_group_compartment = attributes[:'log_group_compartment'] if attributes[:'log_group_compartment'] end |
Instance Attribute Details
#agent_entity_name ⇒ String
The name of the entity which contains the agent.
73 74 75 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 73 def agent_entity_name @agent_entity_name end |
#agent_id ⇒ String
The agent unique identifier.
25 26 27 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 25 def agent_id @agent_id end |
#entity_id ⇒ String
The entity unique identifier.
57 58 59 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 57 def entity_id @entity_id end |
#entity_name ⇒ String
The entity name.
61 62 63 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 61 def entity_name @entity_name end |
#entity_type_display_name ⇒ String
The entity type display name.
77 78 79 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 77 def entity_type_display_name @entity_type_display_name end |
#entity_type_name ⇒ String
The entity type internal name.
65 66 67 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 65 def entity_type_name @entity_type_name end |
#failure_message ⇒ String
The failure message.
21 22 23 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 21 def end |
#host ⇒ String
The host name.
69 70 71 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 69 def host @host end |
#life_cycle_state ⇒ String
The lifecycle status. Valid values are ACCEPTED, IN_PROGRESS, SUCCEEDED or FAILED.
53 54 55 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 53 def life_cycle_state @life_cycle_state end |
#log_group_compartment ⇒ String
The log group compartment.
89 90 91 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 89 def log_group_compartment @log_group_compartment end |
#log_group_id ⇒ String
The log group unique identifier.
81 82 83 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 81 def log_group_id @log_group_id end |
#log_group_name ⇒ String
The log group name.
85 86 87 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 85 def log_group_name @log_group_name end |
#retry_count ⇒ Integer
The number of times the association will be attempted before failing.
35 36 37 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 35 def retry_count @retry_count end |
#source_display_name ⇒ String
The source display name.
43 44 45 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 43 def source_display_name @source_display_name end |
#source_name ⇒ String
The source name.
39 40 41 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 39 def source_name @source_name end |
#source_type_name ⇒ String
The source type internal name.
47 48 49 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 47 def source_type_name @source_type_name end |
#time_last_attempted ⇒ DateTime
The last attempt date.
29 30 31 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 29 def time_last_attempted @time_last_attempted end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 92 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'failure_message': :'failureMessage', 'agent_id': :'agentId', 'time_last_attempted': :'timeLastAttempted', 'retry_count': :'retryCount', 'source_name': :'sourceName', 'source_display_name': :'sourceDisplayName', 'source_type_name': :'sourceTypeName', 'life_cycle_state': :'lifeCycleState', 'entity_id': :'entityId', 'entity_name': :'entityName', 'entity_type_name': :'entityTypeName', 'host': :'host', 'agent_entity_name': :'agentEntityName', 'entity_type_display_name': :'entityTypeDisplayName', 'log_group_id': :'logGroupId', 'log_group_name': :'logGroupName', 'log_group_compartment': :'logGroupCompartment' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 117 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'failure_message': :'String', 'agent_id': :'String', 'time_last_attempted': :'DateTime', 'retry_count': :'Integer', 'source_name': :'String', 'source_display_name': :'String', 'source_type_name': :'String', 'life_cycle_state': :'String', 'entity_id': :'String', 'entity_name': :'String', 'entity_type_name': :'String', 'host': :'String', 'agent_entity_name': :'String', 'entity_type_display_name': :'String', 'log_group_id': :'String', 'log_group_name': :'String', 'log_group_compartment': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 291 def ==(other) return true if equal?(other) self.class == other.class && == other. && agent_id == other.agent_id && time_last_attempted == other.time_last_attempted && retry_count == other.retry_count && source_name == other.source_name && source_display_name == other.source_display_name && source_type_name == other.source_type_name && life_cycle_state == other.life_cycle_state && entity_id == other.entity_id && entity_name == other.entity_name && entity_type_name == other.entity_type_name && host == other.host && agent_entity_name == other.agent_entity_name && entity_type_display_name == other.entity_type_display_name && log_group_id == other.log_group_id && log_group_name == other.log_group_name && log_group_compartment == other.log_group_compartment end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 337 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
317 318 319 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 317 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
326 327 328 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 326 def hash [, agent_id, time_last_attempted, retry_count, source_name, source_display_name, source_type_name, life_cycle_state, entity_id, entity_name, entity_type_name, host, agent_entity_name, entity_type_display_name, log_group_id, log_group_name, log_group_compartment].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
370 371 372 373 374 375 376 377 378 379 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 370 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
364 365 366 |
# File 'lib/oci/log_analytics/models/log_analytics_association.rb', line 364 def to_s to_hash.to_s end |