Class: OCI::Database::Models::AutonomousPatchSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::AutonomousPatchSummary
- Defined in:
- lib/oci/database/models/autonomous_patch_summary.rb
Overview
A patch for an Autonomous Exadata Infrastructure or Autonomous Container Database.
To use any of the API operations, you must be authorized in an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.
Constant Summary collapse
- LIFECYCLE_STATE_ENUM =
[ LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE'.freeze, LIFECYCLE_STATE_SUCCESS = 'SUCCESS'.freeze, LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze, LIFECYCLE_STATE_FAILED = 'FAILED'.freeze, LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- PATCH_MODEL_ENUM =
[ PATCH_MODEL_RELEASE_UPDATES = 'RELEASE_UPDATES'.freeze, PATCH_MODEL_RELEASE_UPDATE_REVISIONS = 'RELEASE_UPDATE_REVISIONS'.freeze, PATCH_MODEL_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- AUTONOMOUS_PATCH_TYPE_ENUM =
[ AUTONOMOUS_PATCH_TYPE_QUARTERLY = 'QUARTERLY'.freeze, AUTONOMOUS_PATCH_TYPE_TIMEZONE = 'TIMEZONE'.freeze, AUTONOMOUS_PATCH_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#autonomous_patch_type ⇒ String
Maintenance run type, either "QUARTERLY" or "TIMEZONE".
-
#description ⇒ String
[Required] The text describing this patch package.
-
#id ⇒ String
[Required] The OCID of the patch.
-
#lifecycle_details ⇒ String
A descriptive text associated with the lifecycleState.
-
#lifecycle_state ⇒ String
The current state of the patch as a result of lastAction.
-
#patch_model ⇒ String
Database patching model preference.
-
#quarter ⇒ String
First month of the quarter in which the patch was released.
-
#time_released ⇒ DateTime
[Required] The date and time that the patch was released.
-
#type ⇒ String
[Required] The type of patch.
-
#version ⇒ String
[Required] The version of this patch package.
-
#year ⇒ String
Year in which the patch was released.
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 = {}) ⇒ AutonomousPatchSummary
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 = {}) ⇒ AutonomousPatchSummary
Initializes the object
139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 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 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 139 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.id = attributes[:'id'] if attributes[:'id'] self.description = attributes[:'description'] if attributes[:'description'] self.type = attributes[:'type'] if attributes[:'type'] self.lifecycle_details = attributes[:'lifecycleDetails'] if attributes[:'lifecycleDetails'] raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') self.lifecycle_details = attributes[:'lifecycle_details'] if attributes[:'lifecycle_details'] self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState'] raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state'] self.time_released = attributes[:'timeReleased'] if attributes[:'timeReleased'] raise 'You cannot provide both :timeReleased and :time_released' if attributes.key?(:'timeReleased') && attributes.key?(:'time_released') self.time_released = attributes[:'time_released'] if attributes[:'time_released'] self.version = attributes[:'version'] if attributes[:'version'] self.patch_model = attributes[:'patchModel'] if attributes[:'patchModel'] raise 'You cannot provide both :patchModel and :patch_model' if attributes.key?(:'patchModel') && attributes.key?(:'patch_model') self.patch_model = attributes[:'patch_model'] if attributes[:'patch_model'] self.quarter = attributes[:'quarter'] if attributes[:'quarter'] self.year = attributes[:'year'] if attributes[:'year'] self.autonomous_patch_type = attributes[:'autonomousPatchType'] if attributes[:'autonomousPatchType'] self.autonomous_patch_type = "QUARTERLY" if autonomous_patch_type.nil? && !attributes.key?(:'autonomousPatchType') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :autonomousPatchType and :autonomous_patch_type' if attributes.key?(:'autonomousPatchType') && attributes.key?(:'autonomous_patch_type') self.autonomous_patch_type = attributes[:'autonomous_patch_type'] if attributes[:'autonomous_patch_type'] self.autonomous_patch_type = "QUARTERLY" if autonomous_patch_type.nil? && !attributes.key?(:'autonomousPatchType') && !attributes.key?(:'autonomous_patch_type') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#autonomous_patch_type ⇒ String
Maintenance run type, either "QUARTERLY" or "TIMEZONE".
82 83 84 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 82 def autonomous_patch_type @autonomous_patch_type end |
#description ⇒ String
[Required] The text describing this patch package.
43 44 45 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 43 def description @description end |
#id ⇒ String
[Required] The OCID of the patch.
39 40 41 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 39 def id @id end |
#lifecycle_details ⇒ String
A descriptive text associated with the lifecycleState. Typically can contain additional displayable text.
53 54 55 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 53 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the patch as a result of lastAction.
57 58 59 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 57 def lifecycle_state @lifecycle_state end |
#patch_model ⇒ String
Database patching model preference. See My Oracle Support note 2285040.1 for information on the Release Update (RU) and Release Update Revision (RUR) patching models.
69 70 71 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 69 def patch_model @patch_model end |
#quarter ⇒ String
First month of the quarter in which the patch was released.
73 74 75 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 73 def quarter @quarter end |
#time_released ⇒ DateTime
[Required] The date and time that the patch was released.
61 62 63 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 61 def time_released @time_released end |
#type ⇒ String
[Required] The type of patch. BUNDLE is one example.
47 48 49 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 47 def type @type end |
#version ⇒ String
[Required] The version of this patch package.
65 66 67 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 65 def version @version end |
#year ⇒ String
Year in which the patch was released.
77 78 79 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 77 def year @year end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'description': :'description', 'type': :'type', 'lifecycle_details': :'lifecycleDetails', 'lifecycle_state': :'lifecycleState', 'time_released': :'timeReleased', 'version': :'version', 'patch_model': :'patchModel', 'quarter': :'quarter', 'year': :'year', 'autonomous_patch_type': :'autonomousPatchType' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 104 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'description': :'String', 'type': :'String', 'lifecycle_details': :'String', 'lifecycle_state': :'String', 'time_released': :'DateTime', 'version': :'String', 'patch_model': :'String', 'quarter': :'String', 'year': :'String', 'autonomous_patch_type': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 236 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && description == other.description && type == other.type && lifecycle_details == other.lifecycle_details && lifecycle_state == other.lifecycle_state && time_released == other.time_released && version == other.version && patch_model == other.patch_model && quarter == other.quarter && year == other.year && autonomous_patch_type == other.autonomous_patch_type end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 276 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
256 257 258 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 256 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
265 266 267 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 265 def hash [id, description, type, lifecycle_details, lifecycle_state, time_released, version, patch_model, quarter, year, autonomous_patch_type].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
309 310 311 312 313 314 315 316 317 318 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 309 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
303 304 305 |
# File 'lib/oci/database/models/autonomous_patch_summary.rb', line 303 def to_s to_hash.to_s end |