Class: OCI::Database::Models::Patch
- Inherits:
-
Object
- Object
- OCI::Database::Models::Patch
- Defined in:
- lib/oci/database/models/patch.rb
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
The text describing this patch package.
-
#id ⇒ String
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
The date and time that the patch was released.
-
#version ⇒ String
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 = {}) ⇒ Patch
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 = {}) ⇒ Patch
Initializes the object
61 62 63 64 65 66 67 68 69 70 71 72 73 74 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 |
# File 'lib/oci/database/models/patch.rb', line 61 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 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 if attributes[:'lifecycleDetails'] self.lifecycle_details = attributes[:'lifecycleDetails'] end if attributes[:'lifecycleState'] self.lifecycle_state = attributes[:'lifecycleState'] end if attributes[:'timeReleased'] self.time_released = attributes[:'timeReleased'] 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.
26 27 28 |
# File 'lib/oci/database/models/patch.rb', line 26 def available_actions @available_actions end |
#description ⇒ String
The text describing this patch package.
30 31 32 |
# File 'lib/oci/database/models/patch.rb', line 30 def description @description end |
#id ⇒ String
The OCID of the patch.
34 35 36 |
# File 'lib/oci/database/models/patch.rb', line 34 def id @id end |
#last_action ⇒ String
Action that is currently being performed or was completed last.
38 39 40 |
# File 'lib/oci/database/models/patch.rb', line 38 def last_action @last_action end |
#lifecycle_details ⇒ String
A descriptive text associated with the lifecycleState. Typically can contain additional displayable text.
44 45 46 |
# File 'lib/oci/database/models/patch.rb', line 44 def lifecycle_details @lifecycle_details end |
#lifecycle_state ⇒ String
The current state of the patch as a result of lastAction.
48 49 50 |
# File 'lib/oci/database/models/patch.rb', line 48 def lifecycle_state @lifecycle_state end |
#time_released ⇒ DateTime
The date and time that the patch was released.
52 53 54 |
# File 'lib/oci/database/models/patch.rb', line 52 def time_released @time_released end |
#version ⇒ String
The version of this patch package.
56 57 58 |
# File 'lib/oci/database/models/patch.rb', line 56 def version @version end |
Instance Method Details
#==(other_object) ⇒ Object
Checks equality by comparing each attribute.
136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/database/models/patch.rb', line 136 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
164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 |
# File 'lib/oci/database/models/patch.rb', line 164 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
151 152 153 |
# File 'lib/oci/database/models/patch.rb', line 151 def eql?(other_object) self == other_object end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
157 158 159 |
# File 'lib/oci/database/models/patch.rb', line 157 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
189 190 191 192 193 194 195 196 197 |
# File 'lib/oci/database/models/patch.rb', line 189 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
183 184 185 |
# File 'lib/oci/database/models/patch.rb', line 183 def to_s to_hash.to_s end |