Class: OCI::OsManagementHub::Models::SysadminEventData
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::SysadminEventData
- Defined in:
- lib/oci/os_management_hub/models/sysadmin_event_data.rb
Overview
Data related to the sysadmin event.
Constant Summary collapse
- RESOLUTION_STATUS_ENUM =
[ RESOLUTION_STATUS_SUCCEEDED = 'SUCCEEDED'.freeze, RESOLUTION_STATUS_FAILED = 'FAILED'.freeze, RESOLUTION_STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
- #additional_details ⇒ OCI::OsManagementHub::Models::WorkRequestEventDataAdditionalDetails
-
#attempted_resolutions ⇒ Array<String>
[Required] The actions used to attempt fixing the error.
-
#error_cause ⇒ String
[Required] The commands executed by the agent that caused the error.
-
#error_log ⇒ String
[Required] The output log of the error.
-
#resolution_log ⇒ String
[Required] The log output after the resolutions.
-
#resolution_status ⇒ String
[Required] Indicates if the event succeeded.
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 = {}) ⇒ SysadminEventData
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 = {}) ⇒ SysadminEventData
Initializes the object
81 82 83 84 85 86 87 88 89 90 91 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 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 81 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.error_cause = attributes[:'errorCause'] if attributes[:'errorCause'] raise 'You cannot provide both :errorCause and :error_cause' if attributes.key?(:'errorCause') && attributes.key?(:'error_cause') self.error_cause = attributes[:'error_cause'] if attributes[:'error_cause'] self.error_log = attributes[:'errorLog'] if attributes[:'errorLog'] raise 'You cannot provide both :errorLog and :error_log' if attributes.key?(:'errorLog') && attributes.key?(:'error_log') self.error_log = attributes[:'error_log'] if attributes[:'error_log'] self.attempted_resolutions = attributes[:'attemptedResolutions'] if attributes[:'attemptedResolutions'] raise 'You cannot provide both :attemptedResolutions and :attempted_resolutions' if attributes.key?(:'attemptedResolutions') && attributes.key?(:'attempted_resolutions') self.attempted_resolutions = attributes[:'attempted_resolutions'] if attributes[:'attempted_resolutions'] self.resolution_status = attributes[:'resolutionStatus'] if attributes[:'resolutionStatus'] raise 'You cannot provide both :resolutionStatus and :resolution_status' if attributes.key?(:'resolutionStatus') && attributes.key?(:'resolution_status') self.resolution_status = attributes[:'resolution_status'] if attributes[:'resolution_status'] self.resolution_log = attributes[:'resolutionLog'] if attributes[:'resolutionLog'] raise 'You cannot provide both :resolutionLog and :resolution_log' if attributes.key?(:'resolutionLog') && attributes.key?(:'resolution_log') self.resolution_log = attributes[:'resolution_log'] if attributes[:'resolution_log'] self.additional_details = attributes[:'additionalDetails'] if attributes[:'additionalDetails'] raise 'You cannot provide both :additionalDetails and :additional_details' if attributes.key?(:'additionalDetails') && attributes.key?(:'additional_details') self.additional_details = attributes[:'additional_details'] if attributes[:'additional_details'] end |
Instance Attribute Details
#additional_details ⇒ OCI::OsManagementHub::Models::WorkRequestEventDataAdditionalDetails
39 40 41 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 39 def additional_details @additional_details end |
#attempted_resolutions ⇒ Array<String>
[Required] The actions used to attempt fixing the error.
28 29 30 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 28 def attempted_resolutions @attempted_resolutions end |
#error_cause ⇒ String
[Required] The commands executed by the agent that caused the error.
20 21 22 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 20 def error_cause @error_cause end |
#error_log ⇒ String
[Required] The output log of the error.
24 25 26 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 24 def error_log @error_log end |
#resolution_log ⇒ String
[Required] The log output after the resolutions.
36 37 38 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 36 def resolution_log @resolution_log end |
#resolution_status ⇒ String
[Required] Indicates if the event succeeded.
32 33 34 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 32 def resolution_status @resolution_status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 42 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'error_cause': :'errorCause', 'error_log': :'errorLog', 'attempted_resolutions': :'attemptedResolutions', 'resolution_status': :'resolutionStatus', 'resolution_log': :'resolutionLog', 'additional_details': :'additionalDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
56 57 58 59 60 61 62 63 64 65 66 67 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 56 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'error_cause': :'String', 'error_log': :'String', 'attempted_resolutions': :'Array<String>', 'resolution_status': :'String', 'resolution_log': :'String', 'additional_details': :'OCI::OsManagementHub::Models::WorkRequestEventDataAdditionalDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 144 def ==(other) return true if equal?(other) self.class == other.class && error_cause == other.error_cause && error_log == other.error_log && attempted_resolutions == other.attempted_resolutions && resolution_status == other.resolution_status && resolution_log == other.resolution_log && additional_details == other.additional_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
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/os_management_hub/models/sysadmin_event_data.rb', line 179 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
159 160 161 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 168 def hash [error_cause, error_log, attempted_resolutions, resolution_status, resolution_log, additional_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 212 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
206 207 208 |
# File 'lib/oci/os_management_hub/models/sysadmin_event_data.rb', line 206 def to_s to_hash.to_s end |