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.
- #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
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 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 86 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'] 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 |
#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.
47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 47 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' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 61 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' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 137 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 end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 172 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
152 153 154 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 152 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
161 162 163 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 161 def hash [target, current_version, status, executing_fsu_job_id, active_fsu_cycle_id, progress].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 205 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
199 200 201 |
# File 'lib/oci/fleet_software_update/models/target_summary.rb', line 199 def to_s to_hash.to_s end |