Class: OCI::OsManagementHub::Models::Erratum
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::Erratum
- Defined in:
- lib/oci/os_management_hub/models/erratum.rb
Overview
An object that defines an erratum..
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_TYPE_ENUM =
[ ADVISORY_TYPE_SECURITY = 'SECURITY'.freeze, ADVISORY_TYPE_BUGFIX = 'BUGFIX'.freeze, ADVISORY_TYPE_ENHANCEMENT = 'ENHANCEMENT'.freeze, ADVISORY_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 for a security advisory, otherwise, null.
-
#advisory_type ⇒ String
The advisory type of the erratum.
-
#classification_type ⇒ String
Type of the erratum.
-
#description ⇒ String
Details describing the erratum.
-
#from ⇒ String
Information specifying from where the erratum was release.
-
#name ⇒ String
[Required] Advisory name.
-
#os_families ⇒ Array<OCI::OsManagementHub::Models::OsFamily>
List of affected OS families.
-
#packages ⇒ Array<OCI::OsManagementHub::Models::SoftwarePackageSummary>
List of packages affected by this erratum.
-
#references ⇒ String
Information describing how to find more information about.
-
#related_cves ⇒ Array<String>
List of CVEs applicable to this erratum.
-
#repositories ⇒ Array<String>
List of repository identifiers.
-
#solution ⇒ String
Information describing how the erratum can be resolved.
-
#synopsis ⇒ String
Summary description of the erratum.
-
#time_issued ⇒ DateTime
The date and time the erratum was issued (in RFC 3339 format).
-
#time_updated ⇒ DateTime
The date and time the erratum was updated (in RFC 3339 format).
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 = {}) ⇒ Erratum
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 = {}) ⇒ Erratum
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 |
# File 'lib/oci/os_management_hub/models/erratum.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.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.description = attributes[:'description'] if attributes[:'description'] 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.advisory_type = attributes[:'advisoryType'] if attributes[:'advisoryType'] raise 'You cannot provide both :advisoryType and :advisory_type' if attributes.key?(:'advisoryType') && attributes.key?(:'advisory_type') self.advisory_type = attributes[:'advisory_type'] if attributes[:'advisory_type'] self.from = attributes[:'from'] if attributes[:'from'] self.solution = attributes[:'solution'] if attributes[:'solution'] self.references = attributes[:'references'] if attributes[:'references'] 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.repositories = attributes[:'repositories'] if attributes[:'repositories'] self.packages = attributes[:'packages'] if attributes[:'packages'] 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 for a security advisory, otherwise, null.
95 96 97 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 95 def advisory_severity @advisory_severity end |
#advisory_type ⇒ String
The advisory type of the erratum.
63 64 65 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 63 def advisory_type @advisory_type end |
#classification_type ⇒ String
Type of the erratum. This property is deprecated and it will be removed in a future API release. Please refer to the advisoryType property instead.
59 60 61 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 59 def classification_type @classification_type end |
#description ⇒ String
Details describing the erratum.
50 51 52 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 50 def description @description end |
#from ⇒ String
Information specifying from where the erratum was release.
67 68 69 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 67 def from @from end |
#name ⇒ String
[Required] Advisory name.
37 38 39 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 37 def name @name end |
#os_families ⇒ Array<OCI::OsManagementHub::Models::OsFamily>
List of affected OS families.
91 92 93 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 91 def os_families @os_families end |
#packages ⇒ Array<OCI::OsManagementHub::Models::SoftwarePackageSummary>
List of packages affected by this erratum.
87 88 89 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 87 def packages @packages end |
#references ⇒ String
Information describing how to find more information about. the erratum.
75 76 77 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 75 def references @references end |
#related_cves ⇒ Array<String>
List of CVEs applicable to this erratum.
79 80 81 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 79 def @related_cves end |
#repositories ⇒ Array<String>
List of repository identifiers.
83 84 85 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 83 def repositories @repositories end |
#solution ⇒ String
Information describing how the erratum can be resolved.
71 72 73 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 71 def solution @solution end |
#synopsis ⇒ String
Summary description of the erratum.
41 42 43 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 41 def synopsis @synopsis end |
#time_issued ⇒ DateTime
The date and time the erratum was issued (in RFC 3339 format).
46 47 48 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 46 def time_issued @time_issued end |
#time_updated ⇒ DateTime
The date and time the erratum was updated (in RFC 3339 format).
55 56 57 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 55 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 98 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'name': :'name', 'synopsis': :'synopsis', 'time_issued': :'timeIssued', 'description': :'description', 'time_updated': :'timeUpdated', 'classification_type': :'classificationType', 'advisory_type': :'advisoryType', 'from': :'from', 'solution': :'solution', 'references': :'references', 'related_cves': :'relatedCves', 'repositories': :'repositories', 'packages': :'packages', 'os_families': :'osFamilies', 'advisory_severity': :'advisorySeverity' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 121 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'name': :'String', 'synopsis': :'String', 'time_issued': :'DateTime', 'description': :'String', 'time_updated': :'DateTime', 'classification_type': :'String', 'advisory_type': :'String', 'from': :'String', 'solution': :'String', 'references': :'String', 'related_cves': :'Array<String>', 'repositories': :'Array<String>', 'packages': :'Array<OCI::OsManagementHub::Models::SoftwarePackageSummary>', '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.
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 275 def ==(other) return true if equal?(other) self.class == other.class && name == other.name && synopsis == other.synopsis && time_issued == other.time_issued && description == other.description && time_updated == other.time_updated && classification_type == other.classification_type && advisory_type == other.advisory_type && from == other.from && solution == other.solution && references == other.references && == other. && repositories == other.repositories && packages == other.packages && os_families == other.os_families && advisory_severity == other.advisory_severity end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 319 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
299 300 301 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 299 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
308 309 310 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 308 def hash [name, synopsis, time_issued, description, time_updated, classification_type, advisory_type, from, solution, references, , repositories, packages, os_families, advisory_severity].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
352 353 354 355 356 357 358 359 360 361 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 352 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
346 347 348 |
# File 'lib/oci/os_management_hub/models/erratum.rb', line 346 def to_s to_hash.to_s end |