Class: OCI::Bds::Models::OsPatchDetails
- Inherits:
-
Object
- Object
- OCI::Bds::Models::OsPatchDetails
- Defined in:
- lib/oci/bds/models/os_patch_details.rb
Overview
Details of an os patch.
Constant Summary collapse
- PATCH_TYPE_ENUM =
[ PATCH_TYPE_REGULAR = 'REGULAR'.freeze, PATCH_TYPE_CUSTOM = 'CUSTOM'.freeze, PATCH_TYPE_EMERGENT = 'EMERGENT'.freeze, PATCH_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#min_bds_version ⇒ String
[Required] Minimum BDS version required to install current OS patch.
-
#min_compatible_odh_version_map ⇒ Hash<String, String>
[Required] Map of major ODH version to minimum ODH version required to install current OS patch.
-
#os_patch_version ⇒ String
[Required] Version of the os patch.
-
#patch_type ⇒ String
[Required] Type of a specific os patch.
-
#release_date ⇒ DateTime
[Required] Released date of the OS patch.
-
#target_packages ⇒ Array<OCI::Bds::Models::OsPatchPackageSummary>
[Required] List of summaries of individual target packages.
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 = {}) ⇒ OsPatchDetails
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 = {}) ⇒ OsPatchDetails
Initializes the object
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 123 124 125 126 127 128 129 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 88 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.os_patch_version = attributes[:'osPatchVersion'] if attributes[:'osPatchVersion'] raise 'You cannot provide both :osPatchVersion and :os_patch_version' if attributes.key?(:'osPatchVersion') && attributes.key?(:'os_patch_version') self.os_patch_version = attributes[:'os_patch_version'] if attributes[:'os_patch_version'] self.min_bds_version = attributes[:'minBdsVersion'] if attributes[:'minBdsVersion'] raise 'You cannot provide both :minBdsVersion and :min_bds_version' if attributes.key?(:'minBdsVersion') && attributes.key?(:'min_bds_version') self.min_bds_version = attributes[:'min_bds_version'] if attributes[:'min_bds_version'] self.min_compatible_odh_version_map = attributes[:'minCompatibleOdhVersionMap'] if attributes[:'minCompatibleOdhVersionMap'] raise 'You cannot provide both :minCompatibleOdhVersionMap and :min_compatible_odh_version_map' if attributes.key?(:'minCompatibleOdhVersionMap') && attributes.key?(:'min_compatible_odh_version_map') self.min_compatible_odh_version_map = attributes[:'min_compatible_odh_version_map'] if attributes[:'min_compatible_odh_version_map'] self.target_packages = attributes[:'targetPackages'] if attributes[:'targetPackages'] raise 'You cannot provide both :targetPackages and :target_packages' if attributes.key?(:'targetPackages') && attributes.key?(:'target_packages') self.target_packages = attributes[:'target_packages'] if attributes[:'target_packages'] self.release_date = attributes[:'releaseDate'] if attributes[:'releaseDate'] raise 'You cannot provide both :releaseDate and :release_date' if attributes.key?(:'releaseDate') && attributes.key?(:'release_date') self.release_date = attributes[:'release_date'] if attributes[:'release_date'] self.patch_type = attributes[:'patchType'] if attributes[:'patchType'] raise 'You cannot provide both :patchType and :patch_type' if attributes.key?(:'patchType') && attributes.key?(:'patch_type') self.patch_type = attributes[:'patch_type'] if attributes[:'patch_type'] end |
Instance Attribute Details
#min_bds_version ⇒ String
[Required] Minimum BDS version required to install current OS patch.
25 26 27 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 25 def min_bds_version @min_bds_version end |
#min_compatible_odh_version_map ⇒ Hash<String, String>
[Required] Map of major ODH version to minimum ODH version required to install current OS patch. e.g. 0.9.1
30 31 32 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 30 def min_compatible_odh_version_map @min_compatible_odh_version_map end |
#os_patch_version ⇒ String
[Required] Version of the os patch.
21 22 23 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 21 def os_patch_version @os_patch_version end |
#patch_type ⇒ String
[Required] Type of a specific os patch. REGULAR means standard released os patches. CUSTOM means os patches with some customizations. EMERGENT means os patches with some emergency fixes that should be prioritized.
46 47 48 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 46 def patch_type @patch_type end |
#release_date ⇒ DateTime
[Required] Released date of the OS patch.
38 39 40 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 38 def release_date @release_date end |
#target_packages ⇒ Array<OCI::Bds::Models::OsPatchPackageSummary>
[Required] List of summaries of individual target packages.
34 35 36 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 34 def target_packages @target_packages end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 49 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'os_patch_version': :'osPatchVersion', 'min_bds_version': :'minBdsVersion', 'min_compatible_odh_version_map': :'minCompatibleOdhVersionMap', 'target_packages': :'targetPackages', 'release_date': :'releaseDate', 'patch_type': :'patchType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
63 64 65 66 67 68 69 70 71 72 73 74 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 63 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'os_patch_version': :'String', 'min_bds_version': :'String', 'min_compatible_odh_version_map': :'Hash<String, String>', 'target_packages': :'Array<OCI::Bds::Models::OsPatchPackageSummary>', 'release_date': :'DateTime', 'patch_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
151 152 153 154 155 156 157 158 159 160 161 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 151 def ==(other) return true if equal?(other) self.class == other.class && os_patch_version == other.os_patch_version && min_bds_version == other.min_bds_version && min_compatible_odh_version_map == other.min_compatible_odh_version_map && target_packages == other.target_packages && release_date == other.release_date && patch_type == other.patch_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 186 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
166 167 168 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 166 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
175 176 177 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 175 def hash [os_patch_version, min_bds_version, min_compatible_odh_version_map, target_packages, release_date, patch_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
219 220 221 222 223 224 225 226 227 228 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 219 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
213 214 215 |
# File 'lib/oci/bds/models/os_patch_details.rb', line 213 def to_s to_hash.to_s end |