Class: OCI::OsManagementHub::Models::ErratumSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::ErratumSummary
- Defined in:
- lib/oci/os_management_hub/models/erratum_summary.rb
Overview
Important changes for software. This can include security advisories, bug fixes, or enhancements.
Constant Summary collapse
- CLASSIFICATION_TYPE_ENUM =
[ CLASSIFICATION_TYPE_SECURITY = 'SECURITY'.freeze, CLASSIFICATION_TYPE_BUGFIX = 'BUGFIX'.freeze, CLASSIFICATION_TYPE_ENHANCEMENT = 'ENHANCEMENT'.freeze, CLASSIFICATION_TYPE_OTHER = 'OTHER'.freeze, CLASSIFICATION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- ADVISORY_SEVERITY_ENUM =
[ ADVISORY_SEVERITY_LOW = 'LOW'.freeze, ADVISORY_SEVERITY_MODERATE = 'MODERATE'.freeze, ADVISORY_SEVERITY_IMPORTANT = 'IMPORTANT'.freeze, ADVISORY_SEVERITY_CRITICAL = 'CRITICAL'.freeze, ADVISORY_SEVERITY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#advisory_severity ⇒ String
The severity advisory.
-
#classification_type ⇒ String
Type of the erratum.
-
#name ⇒ String
[Required] Advisory name.
-
#os_families ⇒ Array<OCI::OsManagementHub::Models::OsFamily>
List of affected OS families.
-
#related_cves ⇒ Array<String>
List of CVEs applicable to this erratum.
-
#synopsis ⇒ String
Summary description of the erratum.
-
#time_issued ⇒ DateTime
Date the erratum was issued, as described in RFC 3339, section 14.29.
-
#time_updated ⇒ DateTime
Most recent date the erratum was updated, as described in RFC 3339, section 14.29.
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 = {}) ⇒ ErratumSummary
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 = {}) ⇒ ErratumSummary
Initializes the object
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 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 110 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.name = attributes[:'name'] if attributes[:'name'] self.synopsis = attributes[:'synopsis'] if attributes[:'synopsis'] self.time_issued = attributes[:'timeIssued'] if attributes[:'timeIssued'] raise 'You cannot provide both :timeIssued and :time_issued' if attributes.key?(:'timeIssued') && attributes.key?(:'time_issued') self.time_issued = attributes[:'time_issued'] if attributes[:'time_issued'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.classification_type = attributes[:'classificationType'] if attributes[:'classificationType'] raise 'You cannot provide both :classificationType and :classification_type' if attributes.key?(:'classificationType') && attributes.key?(:'classification_type') self.classification_type = attributes[:'classification_type'] if attributes[:'classification_type'] self. = attributes[:'relatedCves'] if attributes[:'relatedCves'] raise 'You cannot provide both :relatedCves and :related_cves' if attributes.key?(:'relatedCves') && attributes.key?(:'related_cves') self. = attributes[:'related_cves'] if attributes[:'related_cves'] self.os_families = attributes[:'osFamilies'] if attributes[:'osFamilies'] raise 'You cannot provide both :osFamilies and :os_families' if attributes.key?(:'osFamilies') && attributes.key?(:'os_families') self.os_families = attributes[:'os_families'] if attributes[:'os_families'] self.advisory_severity = attributes[:'advisorySeverity'] if attributes[:'advisorySeverity'] raise 'You cannot provide both :advisorySeverity and :advisory_severity' if attributes.key?(:'advisorySeverity') && attributes.key?(:'advisory_severity') self.advisory_severity = attributes[:'advisory_severity'] if attributes[:'advisory_severity'] end |
Instance Attribute Details
#advisory_severity ⇒ String
The severity advisory. Only valid for security type advisories.
62 63 64 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 62 def advisory_severity @advisory_severity end |
#classification_type ⇒ String
Type of the erratum.
50 51 52 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 50 def classification_type @classification_type end |
#name ⇒ String
[Required] Advisory name.
30 31 32 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 30 def name @name end |
#os_families ⇒ Array<OCI::OsManagementHub::Models::OsFamily>
List of affected OS families.
58 59 60 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 58 def os_families @os_families end |
#related_cves ⇒ Array<String>
List of CVEs applicable to this erratum.
54 55 56 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 54 def @related_cves end |
#synopsis ⇒ String
Summary description of the erratum.
34 35 36 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 34 def synopsis @synopsis end |
#time_issued ⇒ DateTime
Date the erratum was issued, as described in RFC 3339, section 14.29.
40 41 42 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 40 def time_issued @time_issued end |
#time_updated ⇒ DateTime
Most recent date the erratum was updated, as described in RFC 3339, section 14.29.
46 47 48 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 46 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 65 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'synopsis': :'synopsis', 'time_issued': :'timeIssued', 'time_updated': :'timeUpdated', 'classification_type': :'classificationType', 'related_cves': :'relatedCves', 'os_families': :'osFamilies', 'advisory_severity': :'advisorySeverity' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 81 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'synopsis': :'String', 'time_issued': :'DateTime', 'time_updated': :'DateTime', 'classification_type': :'String', 'related_cves': :'Array<String>', 'os_families': :'Array<OCI::OsManagementHub::Models::OsFamily>', 'advisory_severity': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 190 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && synopsis == other.synopsis && time_issued == other.time_issued && time_updated == other.time_updated && classification_type == other.classification_type && == other. && os_families == other.os_families && advisory_severity == other.advisory_severity end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 227 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
207 208 209 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 207 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
216 217 218 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 216 def hash [name, synopsis, time_issued, time_updated, classification_type, , os_families, advisory_severity].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
260 261 262 263 264 265 266 267 268 269 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 260 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
254 255 256 |
# File 'lib/oci/os_management_hub/models/erratum_summary.rb', line 254 def to_s to_hash.to_s end |