Class: OCI::FleetSoftwareUpdate::Models::TargetSummary
- Inherits:
-
Object
- Object
- OCI::FleetSoftwareUpdate::Models::TargetSummary
- Defined in:
- lib/oci/fleet_software_update/models/target_summary.rb
Overview
Details of a target member of a Exadata Fleet Update Collection.
Constant Summary collapse
- STATUS_ENUM =
[ STATUS_IDLE = 'IDLE'.freeze, STATUS_EXECUTING_JOB = 'EXECUTING_JOB'.freeze, STATUS_JOB_FAILED = 'JOB_FAILED'.freeze, STATUS_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#active_fsu_cycle_id ⇒ String
Active Exadata Fleet Update Cycle OCID.
-
#current_version ⇒ String
Current version of the target.
-
#executing_fsu_job_id ⇒ String
Exadata Fleet Update Job OCID executing an action in the target.
-
#memberships ⇒ Array<OCI::FleetSoftwareUpdate::Models::MembershipSummary>
List of Exadata Fleet Update Collections containing this target.
- #progress ⇒ OCI::FleetSoftwareUpdate::Models::TargetProgressSummary
-
#status ⇒ String
Status of the target in the Exadata Fleet Update Collection.
- #target ⇒ OCI::FleetSoftwareUpdate::Models::TargetDetails
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 = {}) ⇒ TargetSummary
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 = {}) ⇒ TargetSummary
Initializes the object
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 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 94 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.target = attributes[:'target'] if attributes[:'target'] self.current_version = attributes[:'currentVersion'] if attributes[:'currentVersion'] raise 'You cannot provide both :currentVersion and :current_version' if attributes.key?(:'currentVersion') && attributes.key?(:'current_version') self.current_version = attributes[:'current_version'] if attributes[:'current_version'] self.status = attributes[:'status'] if attributes[:'status'] self.executing_fsu_job_id = attributes[:'executingFsuJobId'] if attributes[:'executingFsuJobId'] raise 'You cannot provide both :executingFsuJobId and :executing_fsu_job_id' if attributes.key?(:'executingFsuJobId') && attributes.key?(:'executing_fsu_job_id') self.executing_fsu_job_id = attributes[:'executing_fsu_job_id'] if attributes[:'executing_fsu_job_id'] self.active_fsu_cycle_id = attributes[:'activeFsuCycleId'] if attributes[:'activeFsuCycleId'] raise 'You cannot provide both :activeFsuCycleId and :active_fsu_cycle_id' if attributes.key?(:'activeFsuCycleId') && attributes.key?(:'active_fsu_cycle_id') self.active_fsu_cycle_id = attributes[:'active_fsu_cycle_id'] if attributes[:'active_fsu_cycle_id'] self.progress = attributes[:'progress'] if attributes[:'progress'] self.memberships = attributes[:'memberships'] if attributes[:'memberships'] end |
Instance Attribute Details
#active_fsu_cycle_id ⇒ String
Active Exadata Fleet Update Cycle OCID. Null if no Cycle is active that has this target as member.
41 42 43 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 41 def active_fsu_cycle_id @active_fsu_cycle_id end |
#current_version ⇒ String
Current version of the target
26 27 28 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 26 def current_version @current_version end |
#executing_fsu_job_id ⇒ String
Exadata Fleet Update Job OCID executing an action in the target. Null if no job is being executed.
36 37 38 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 36 def executing_fsu_job_id @executing_fsu_job_id end |
#memberships ⇒ Array<OCI::FleetSoftwareUpdate::Models::MembershipSummary>
List of Exadata Fleet Update Collections containing this target.
49 50 51 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 49 def memberships @memberships end |
#progress ⇒ OCI::FleetSoftwareUpdate::Models::TargetProgressSummary
44 45 46 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 44 def progress @progress end |
#status ⇒ String
Status of the target in the Exadata Fleet Update Collection.
31 32 33 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 31 def status @status end |
#target ⇒ OCI::FleetSoftwareUpdate::Models::TargetDetails
21 22 23 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 21 def target @target end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
52 53 54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 52 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'target': :'target', 'current_version': :'currentVersion', 'status': :'status', 'executing_fsu_job_id': :'executingFsuJobId', 'active_fsu_cycle_id': :'activeFsuCycleId', 'progress': :'progress', 'memberships': :'memberships' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
67 68 69 70 71 72 73 74 75 76 77 78 79 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 67 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'target': :'OCI::FleetSoftwareUpdate::Models::TargetDetails', 'current_version': :'String', 'status': :'String', 'executing_fsu_job_id': :'String', 'active_fsu_cycle_id': :'String', 'progress': :'OCI::FleetSoftwareUpdate::Models::TargetProgressSummary', 'memberships': :'Array<OCI::FleetSoftwareUpdate::Models::MembershipSummary>' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 147 def ==(other) return true if equal?(other) self.class == other.class && target == other.target && current_version == other.current_version && status == other.status && executing_fsu_job_id == other.executing_fsu_job_id && active_fsu_cycle_id == other.active_fsu_cycle_id && progress == other.progress && memberships == other.memberships end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 183 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
163 164 165 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 172 def hash [target, current_version, status, executing_fsu_job_id, active_fsu_cycle_id, progress, memberships].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 216 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
210 211 212 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 210 def to_s to_hash.to_s end |