Class: OCI::Database::Models::PatchSummary
- Inherits:
-
Object
- Object
- OCI::Database::Models::PatchSummary
- Defined in:
- lib/oci/database/models/patch_summary.rb
Overview
A Patch for a DB System or DB Home.
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](docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/policygetstarted.htm).
Constant Summary collapse
- AVAILABLE_ACTIONS_ENUM =
[AVAILABLE_ACTIONS_APPLY = 'APPLY', AVAILABLE_ACTIONS_PRECHECK = 'PRECHECK', AVAILABLE_ACTIONS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- LAST_ACTION_ENUM =
[LAST_ACTION_APPLY = 'APPLY', LAST_ACTION_PRECHECK = 'PRECHECK', LAST_ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
- LIFECYCLE_STATE_ENUM =
[LIFECYCLE_STATE_AVAILABLE = 'AVAILABLE', LIFECYCLE_STATE_SUCCESS = 'SUCCESS', LIFECYCLE_STATE_IN_PROGRESS = 'IN_PROGRESS', LIFECYCLE_STATE_FAILED = 'FAILED', LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
Instance Attribute Summary collapse
-
#available_actions ⇒ Array<String>
Actions that can possibly be performed using this patch.
-
#description ⇒ String
[Required] The text describing this patch package.
-
#id ⇒ String
[Required] The OCID of the patch.
-
#last_action ⇒ String
Action that is currently being performed or was completed last.
-
#lifecycle_details ⇒ String
A descriptive text associated with the lifecycleState.
-
#lifecycle_state ⇒ String
The current state of the patch as a result of lastAction.
-
#time_released ⇒ DateTime
[Required] The date and time that the patch was released.
-
#version ⇒ String
[Required] The version of this patch package.
Instance Method Summary collapse
-
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other_object) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ PatchSummary
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 = {}) ⇒ PatchSummary
Initializes the object
75 76 77 78 79 80 81 82 83 84 85 86 87 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 130 131 132 133 134 135 136 137 138 139 140 141 142 143 |
# File 'lib/oci/database/models/patch_summary.rb', line 75 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} if attributes[:'availableActions'] self.available_actions = attributes[:'availableActions'] end raise 'You cannot provide both :availableActions and :available_actions' if attributes.key?(:'availableActions') && attributes.key?(:'available_actions') if attributes[:'available_actions'] self.available_actions = attributes[:'available_actions'] end if attributes[:'description'] self.description = attributes[:'description'] end if attributes[:'id'] self.id = attributes[:'id'] end if attributes[:'lastAction'] self.last_action = attributes[:'lastAction'] end raise 'You cannot provide both :lastAction and :last_action' if attributes.key?(:'lastAction') && attributes.key?(:'last_action') if attributes[:'last_action'] self.last_action = attributes[:'last_action'] end if attributes[:'lifecycleDetails'] self.lifecycle_details = attributes[:'lifecycleDetails'] end raise 'You cannot provide both :lifecycleDetails and :lifecycle_details' if attributes.key?(:'lifecycleDetails') && attributes.key?(:'lifecycle_details') if attributes[:'lifecycle_details'] self.lifecycle_details = attributes[:'lifecycle_details'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state') if attributes[:'lifecycle_state'] self.lifecycle_state = attributes[:'lifecycle_state'] end if attributes[:'timeReleased'] self.time_released = attributes[:'timeReleased'] end raise 'You cannot provide both :timeReleased and :time_released' if attributes.key?(:'timeReleased') && attributes.key?(:'time_released') if attributes[:'time_released'] self.time_released = attributes[:'time_released'] end if attributes[:'version'] self.version = attributes[:'version'] end end |
Instance Attribute Details
#available_actions ⇒ Array<String>
Actions that can possibly be performed using this patch.
32 33 34 |
# File 'lib/oci/database/models/patch_summary.rb', line 32 def available_actions @available_actions end |
#description ⇒ String
[Required] The text describing this patch package.
36 37 38 |
# File 'lib/oci/database/models/patch_summary.rb', line 36 def description @description end |
#id ⇒ String
[Required] The OCID of the patch.
40 41 42 |
# File 'lib/oci/database/models/patch_summary.rb', line 40 def id @id end |
#last_action ⇒ String
Action that is currently being performed or was completed last.
44 45 46 |
# File 'lib/oci/database/models/patch_summary.rb', line 44 def last_action @last_action end |
#lifecycle_details ⇒ String
A descriptive text associated with the lifecycleState. Typically can contain additional displayable text.
50 51 52 |
# File 'lib/oci/database/models/patch_summary.rb', line 50 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the patch as a result of lastAction.
54 55 56 |
# File 'lib/oci/database/models/patch_summary.rb', line 54 def lifecycle_state @lifecycle_state end |
#time_released ⇒ DateTime
[Required] The date and time that the patch was released.
58 59 60 |
# File 'lib/oci/database/models/patch_summary.rb', line 58 def time_released @time_released end |
#version ⇒ String
[Required] The version of this patch package.
62 63 64 |
# File 'lib/oci/database/models/patch_summary.rb', line 62 def version @version end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
180 181 182 183 184 185 186 187 188 189 190 191 |
# File 'lib/oci/database/models/patch_summary.rb', line 180 def ==(other_object) return true if self.equal?(other_object) self.class == other_object.class && available_actions == other_object.available_actions && description == other_object.description && id == other_object.id && last_action == other_object.last_action && lifecycle_details == other_object.lifecycle_details && lifecycle_state == other_object.lifecycle_state && time_released == other_object.time_released && version == other_object.version end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/database/models/patch_summary.rb', line 208 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) self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? self.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_object) ⇒ Boolean
195 196 197 |
# File 'lib/oci/database/models/patch_summary.rb', line 195 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
201 202 203 |
# File 'lib/oci/database/models/patch_summary.rb', line 201 def hash [available_actions, description, id, last_action, lifecycle_details, lifecycle_state, time_released, version].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
233 234 235 236 237 238 239 240 241 |
# File 'lib/oci/database/models/patch_summary.rb', line 233 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
227 228 229 |
# File 'lib/oci/database/models/patch_summary.rb', line 227 def to_s to_hash.to_s end |