Class: OCI::OsManagementHub::Models::UpdatablePackageSummary
- Inherits:
- 
      PackageSummary
      
        - Object
- PackageSummary
- OCI::OsManagementHub::Models::UpdatablePackageSummary
 
- Defined in:
- lib/oci/os_management_hub/models/updatable_package_summary.rb
Overview
Provides summary information for a software package available for installation on a managed instance.
Constant Summary collapse
- UPDATE_TYPE_ENUM =
- [ UPDATE_TYPE_SECURITY = 'SECURITY'.freeze, UPDATE_TYPE_BUGFIX = 'BUGFIX'.freeze, UPDATE_TYPE_ENHANCEMENT = 'ENHANCEMENT'.freeze, UPDATE_TYPE_OTHER = 'OTHER'.freeze, UPDATE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze 
Constants inherited from PackageSummary
PackageSummary::ARCHITECTURE_ENUM, PackageSummary::PACKAGE_CLASSIFICATION_ENUM
Instance Attribute Summary collapse
- 
  
    
      #errata  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    List of errata applicable to this update. 
- 
  
    
      #installed_version  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The version of the package that is currently installed on the instance. 
- 
  
    
      #related_cves  ⇒ Array<String> 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    List of CVEs applicable to this erratum. 
- 
  
    
      #update_type  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    [Required] The type of update. 
Attributes inherited from PackageSummary
#architecture, #display_name, #name, #package_classification, #software_sources, #type, #version
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 = {})  ⇒ UpdatablePackageSummary 
    
    
  
  
  
    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. 
Methods inherited from PackageSummary
Constructor Details
#initialize(attributes = {}) ⇒ UpdatablePackageSummary
Initializes the object
| 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 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 91 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['packageClassification'] = 'UPDATABLE' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.installed_version = attributes[:'installedVersion'] if attributes[:'installedVersion'] raise 'You cannot provide both :installedVersion and :installed_version' if attributes.key?(:'installedVersion') && attributes.key?(:'installed_version') self.installed_version = attributes[:'installed_version'] if attributes[:'installed_version'] self.update_type = attributes[:'updateType'] if attributes[:'updateType'] raise 'You cannot provide both :updateType and :update_type' if attributes.key?(:'updateType') && attributes.key?(:'update_type') self.update_type = attributes[:'update_type'] if attributes[:'update_type'] self.errata = attributes[:'errata'] if attributes[:'errata'] 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'] end | 
Instance Attribute Details
#errata ⇒ Array<String>
List of errata applicable to this update.
| 31 32 33 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 31 def errata @errata end | 
#installed_version ⇒ String
The version of the package that is currently installed on the instance.
| 23 24 25 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 23 def installed_version @installed_version end | 
#related_cves ⇒ Array<String>
List of CVEs applicable to this erratum.
| 35 36 37 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 35 def @related_cves end | 
#update_type ⇒ String
[Required] The type of update.
| 27 28 29 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 27 def update_type @update_type end | 
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
| 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'display_name': :'displayName', 'name': :'name', 'type': :'type', 'version': :'version', 'architecture': :'architecture', 'software_sources': :'softwareSources', 'package_classification': :'packageClassification', 'installed_version': :'installedVersion', 'update_type': :'updateType', 'errata': :'errata', 'related_cves': :'relatedCves' # rubocop:enable Style/SymbolLiteral } end | 
.swagger_types ⇒ Object
Attribute type mapping.
| 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 57 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'display_name': :'String', 'name': :'String', 'type': :'String', 'version': :'String', 'architecture': :'String', 'software_sources': :'Array<OCI::OsManagementHub::Models::SoftwareSourceDetails>', 'package_classification': :'String', 'installed_version': :'String', 'update_type': :'String', 'errata': :'Array<String>', 'related_cves': :'Array<String>' # rubocop:enable Style/SymbolLiteral } end | 
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
| 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 142 def ==(other) return true if equal?(other) self.class == other.class && display_name == other.display_name && name == other.name && type == other.type && version == other.version && architecture == other.architecture && software_sources == other.software_sources && package_classification == other.package_classification && installed_version == other.installed_version && update_type == other.update_type && errata == other.errata && == other. end | 
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
| 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 182 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
| 162 163 164 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 162 def eql?(other) self == other end | 
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
| 171 172 173 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 171 def hash [display_name, name, type, version, architecture, software_sources, package_classification, installed_version, update_type, errata, ].hash end | 
#to_hash ⇒ Hash
Returns the object in the form of hash
| 215 216 217 218 219 220 221 222 223 224 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 215 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
| 209 210 211 | # File 'lib/oci/os_management_hub/models/updatable_package_summary.rb', line 209 def to_s to_hash.to_s end |