Class: OCI::Jms::Models::PluginErrorSummary
- Inherits:
-
Object
- Object
- OCI::Jms::Models::PluginErrorSummary
- Defined in:
- lib/oci/jms/models/plugin_error_summary.rb
Overview
Entity that represents an error identified in a plugin.
Constant Summary collapse
- AGENT_TYPE_ENUM =
[ AGENT_TYPE_OMA = 'OMA'.freeze, AGENT_TYPE_OCA = 'OCA'.freeze, AGENT_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#agent_type ⇒ String
The agent type.
-
#compartment_id ⇒ String
[Required] The compartment OCID of the Fleet.
-
#errors ⇒ Array<OCI::Jms::Models::PluginErrorDetails>
[Required] List of plugin error details.
-
#host_name ⇒ String
The HostName or Compute Instance name of the Managed Instance running the plugin.
-
#managed_instance_id ⇒ String
[Required] The OCID of the Managed Instance running the plugin.
-
#time_first_seen ⇒ DateTime
[Required] The timestamp of the first time an error was detected.
-
#time_last_seen ⇒ DateTime
[Required] The timestamp of the last time an error was detected.
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 = {}) ⇒ PluginErrorSummary
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 = {}) ⇒ PluginErrorSummary
Initializes the object
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 92 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.managed_instance_id = attributes[:'managedInstanceId'] if attributes[:'managedInstanceId'] raise 'You cannot provide both :managedInstanceId and :managed_instance_id' if attributes.key?(:'managedInstanceId') && attributes.key?(:'managed_instance_id') self.managed_instance_id = attributes[:'managed_instance_id'] if attributes[:'managed_instance_id'] self.agent_type = attributes[:'agentType'] if attributes[:'agentType'] raise 'You cannot provide both :agentType and :agent_type' if attributes.key?(:'agentType') && attributes.key?(:'agent_type') self.agent_type = attributes[:'agent_type'] if attributes[:'agent_type'] self.host_name = attributes[:'hostName'] if attributes[:'hostName'] raise 'You cannot provide both :hostName and :host_name' if attributes.key?(:'hostName') && attributes.key?(:'host_name') self.host_name = attributes[:'host_name'] if attributes[:'host_name'] 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.errors = attributes[:'errors'] if attributes[:'errors'] self.time_last_seen = attributes[:'timeLastSeen'] if attributes[:'timeLastSeen'] raise 'You cannot provide both :timeLastSeen and :time_last_seen' if attributes.key?(:'timeLastSeen') && attributes.key?(:'time_last_seen') self.time_last_seen = attributes[:'time_last_seen'] if attributes[:'time_last_seen'] self.time_first_seen = attributes[:'timeFirstSeen'] if attributes[:'timeFirstSeen'] raise 'You cannot provide both :timeFirstSeen and :time_first_seen' if attributes.key?(:'timeFirstSeen') && attributes.key?(:'time_first_seen') self.time_first_seen = attributes[:'time_first_seen'] if attributes[:'time_first_seen'] end |
Instance Attribute Details
#agent_type ⇒ String
The agent type.
24 25 26 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 24 def agent_type @agent_type end |
#compartment_id ⇒ String
[Required] The compartment OCID of the Fleet.
33 34 35 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 33 def compartment_id @compartment_id end |
#errors ⇒ Array<OCI::Jms::Models::PluginErrorDetails>
[Required] List of plugin error details.
37 38 39 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 37 def errors @errors end |
#host_name ⇒ String
The HostName or Compute Instance name of the Managed Instance running the plugin.
28 29 30 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 28 def host_name @host_name end |
#managed_instance_id ⇒ String
[Required] The OCID of the Managed Instance running the plugin.
20 21 22 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 20 def managed_instance_id @managed_instance_id end |
#time_first_seen ⇒ DateTime
[Required] The timestamp of the first time an error was detected.
47 48 49 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 47 def time_first_seen @time_first_seen end |
#time_last_seen ⇒ DateTime
[Required] The timestamp of the last time an error was detected.
42 43 44 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 42 def time_last_seen @time_last_seen end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 50 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'managed_instance_id': :'managedInstanceId', 'agent_type': :'agentType', 'host_name': :'hostName', 'compartment_id': :'compartmentId', 'errors': :'errors', 'time_last_seen': :'timeLastSeen', 'time_first_seen': :'timeFirstSeen' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
65 66 67 68 69 70 71 72 73 74 75 76 77 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 65 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'managed_instance_id': :'String', 'agent_type': :'String', 'host_name': :'String', 'compartment_id': :'String', 'errors': :'Array<OCI::Jms::Models::PluginErrorDetails>', 'time_last_seen': :'DateTime', 'time_first_seen': :'DateTime' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 157 def ==(other) return true if equal?(other) self.class == other.class && managed_instance_id == other.managed_instance_id && agent_type == other.agent_type && host_name == other.host_name && compartment_id == other.compartment_id && errors == other.errors && time_last_seen == other.time_last_seen && time_first_seen == other.time_first_seen end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 193 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
173 174 175 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 173 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
182 183 184 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 182 def hash [managed_instance_id, agent_type, host_name, compartment_id, errors, time_last_seen, time_first_seen].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
226 227 228 229 230 231 232 233 234 235 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 226 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
220 221 222 |
# File 'lib/oci/jms/models/plugin_error_summary.rb', line 220 def to_s to_hash.to_s end |